Best code comments

How, what and why to code in BYOND.
User avatar
paprika
Rarely plays
Joined: Fri Apr 18, 2014 10:20 pm
Byond Username: Paprka
Location: in down bad

Best code comments

Post by paprika » #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
Byond Username: CrimsonVision
Location: England, UK, Earth, Sol, Milky Way, Local Group, Virgo Supercluster, Known Universe
Contact:

Re: Best code comments

Post by Remie Richards » #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
Byond Username: Xhuis
Github Username: Xhuis
Location: North Carolina

Re: Best code comments

Post by Xhuis » #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
Byond Username: Tedward1337
Location: Ontario, Canada

Re: Best code comments

Post by tedward1337 » #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

Post by JJRcop » #61011

Code: Select all

/*
 * WARRANTY VOID IF CODE USED
 */
/code/datums/helper_datums/events.dm Lines 1-3
I lurk quite often...
allura
Joined: Thu May 15, 2014 4:30 am
Byond Username: Allura

Re: Best code comments

Post by allura » #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
Byond Username: Xhuis
Github Username: Xhuis
Location: North Carolina

Re: Best code comments

Post by Xhuis » #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

Post by Saegrimr » #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
Joined: Fri Apr 18, 2014 4:14 pm
Byond Username: Dorsidwarf
Location: We're all going on an, admin holiday

Re: Best code comments

Post by Not-Dorsidarf » #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
Image
kieth4 wrote: infrequently shitting yourself is fine imo
There is a lot of very bizarre nonsense being talked on this forum. I shall now remain silent and logoff until my points are vindicated.
Player who complainted over being killed for looting cap office wrote: Sun Jul 30, 2023 1:33 am Hey there, I'm Virescent, the super evil person who made the stupid appeal and didn't think it through enough. Just came here to say: screech, retards. Screech and writhe like the worms you are. Your pathetic little cries will keep echoing around for a while before quietting down. There is one great outcome from this: I rised up the blood pressure of some of you shitheads and lowered your lifespan. I'm honestly tempted to do this more often just to see you screech and writhe more, but that wouldn't be cool of me. So come on haters, show me some more of your high blood pressure please. 🖕🖕🖕
ACCount
Joined: Fri Jul 04, 2014 2:41 pm
Location: Russia

Re: Best code comments

Post by ACCount » #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

Post by DemonFiren » #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

Post by MisterPerson » #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.

Feedback is dumb and it doesn't matter
User avatar
Babin
Joined: Tue Feb 03, 2015 1:47 am
Byond Username: Babin

Re: Best code comments

Post by Babin » #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
Joined: Fri Apr 18, 2014 4:14 pm
Byond Username: Dorsidwarf
Location: We're all going on an, admin holiday

Re: Best code comments

Post by Not-Dorsidarf » #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
Image
kieth4 wrote: infrequently shitting yourself is fine imo
There is a lot of very bizarre nonsense being talked on this forum. I shall now remain silent and logoff until my points are vindicated.
Player who complainted over being killed for looting cap office wrote: Sun Jul 30, 2023 1:33 am Hey there, I'm Virescent, the super evil person who made the stupid appeal and didn't think it through enough. Just came here to say: screech, retards. Screech and writhe like the worms you are. Your pathetic little cries will keep echoing around for a while before quietting down. There is one great outcome from this: I rised up the blood pressure of some of you shitheads and lowered your lifespan. I'm honestly tempted to do this more often just to see you screech and writhe more, but that wouldn't be cool of me. So come on haters, show me some more of your high blood pressure please. 🖕🖕🖕
User avatar
RocKeD
Joined: Sat May 02, 2015 2:55 am
Byond Username: Rocked

Re: Best code comments

Post by RocKeD » #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

Post by DemonFiren » #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
Joined: Fri Apr 18, 2014 4:14 pm
Byond Username: Dorsidwarf
Location: We're all going on an, admin holiday

Re: Best code comments

Post by Not-Dorsidarf » #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
Image
kieth4 wrote: infrequently shitting yourself is fine imo
There is a lot of very bizarre nonsense being talked on this forum. I shall now remain silent and logoff until my points are vindicated.
Player who complainted over being killed for looting cap office wrote: Sun Jul 30, 2023 1:33 am Hey there, I'm Virescent, the super evil person who made the stupid appeal and didn't think it through enough. Just came here to say: screech, retards. Screech and writhe like the worms you are. Your pathetic little cries will keep echoing around for a while before quietting down. There is one great outcome from this: I rised up the blood pressure of some of you shitheads and lowered your lifespan. I'm honestly tempted to do this more often just to see you screech and writhe more, but that wouldn't be cool of me. So come on haters, show me some more of your high blood pressure please. 🖕🖕🖕
User avatar
MrStonedOne
Host
Joined: Mon Apr 14, 2014 10:56 pm
Byond Username: MrStonedOne
Github Username: MrStonedOne

Re: Best code comments

Post by MrStonedOne » #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 digg(banned), Steam, IRC, Skype Discord. (!vAKvpFcksg)
Image
User avatar
Ricotez
Joined: Thu Apr 17, 2014 9:21 pm
Byond Username: Ricotez
Location: The Netherlands

Re: Best code comments

Post by Ricotez » #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
Byond Username: Xhuis
Github Username: Xhuis
Location: North Carolina

Re: Best code comments

Post by Xhuis » #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

Post by Fr05tByt3 » #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
Joined: Thu Apr 17, 2014 7:35 pm
Byond Username: Bgobandit

Re: Best code comments

Post by bandit » #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
User avatar
Shaps-cloud
Code Maintainer
Joined: Thu Aug 14, 2014 4:25 am
Byond Username: Shaps

Re: Best code comments

Post by Shaps-cloud » #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

Post by Lo6a4evskiy » #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

Post by iamgoofball » #114872

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

Re: Best code comments

Post by Ricotez » #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
Byond Username: Xhuis
Github Username: Xhuis
Location: North Carolina

Re: Best code comments

Post by Xhuis » #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

Post by MrStonedOne » #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 digg(banned), Steam, IRC, Skype Discord. (!vAKvpFcksg)
Image
User avatar
phil235
Joined: Thu Apr 17, 2014 11:39 am
Byond Username: Phil235

Re: Best code comments

Post by phil235 » #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

Post by DemonFiren » #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
One Seven One
Joined: Wed Jun 10, 2015 9:43 am
Byond Username: OneSevenOne

Re: Best code comments

Post by One Seven One » #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 
User avatar
TechnoAlchemist
Joined: Fri Nov 21, 2014 2:39 am
Byond Username: TechnoAlchemist

Re: Best code comments

Post by TechnoAlchemist » #208412

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

Re: Best code comments

Post by Incoming » #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.

Kofi - 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

Post by TechnoAlchemist » #208575

C0reoverload had a PR up that would have fixed it but it god closed because bundles
User avatar
PKPenguin321
Site Admin
Joined: Tue Jul 01, 2014 7:02 pm
Byond Username: PKPenguin321
Github Username: PKPenguin321
Location: U S A, U S A, U S A

Re: Best code comments

Post by PKPenguin321 » #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

Post by TechnoAlchemist » #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
Byond Username: The Ultimate Chimera
Location: The Lifeweb

Re: Best code comments

Post by The Ultimate Chimera » #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

Post by JJRcop » #240005

code/__HELPERS/time.dm line 1
Capture.PNG
Capture.PNG (6.61 KiB) Viewed 20832 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

Post by Saegrimr » #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
Byond Username: CrimsonVision
Location: England, UK, Earth, Sol, Milky Way, Local Group, Virgo Supercluster, Known Universe
Contact:

Re: Best code comments

Post by Remie Richards » #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

Post by DemonFiren » #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

Post by Saegrimr » #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

Post by Iatots » #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
Joined: Thu Apr 17, 2014 7:35 pm
Byond Username: Bgobandit

Re: Best code comments

Post by bandit » #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
Byond Username: Qbopper
Github Username: Qbopper
Location: Canada

Re: Best code comments

Post by Qbopper » #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
Byond Username: Optimumtact
Github Username: optimumtact
Location: #CHATSHITGETBANGED

Re: Best code comments

Post by oranges » #275116

Saegrimr wrote:And here I thought the month/day/year joke was obvious.
it's year/month/day numbnuts
lzimann
Joined: Sun Oct 26, 2014 5:13 am
Byond Username: Lzimann
Github Username: lzimann

Re: Best code comments

Post by lzimann » #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
Byond Username: CrimsonVision
Location: England, UK, Earth, Sol, Milky Way, Local Group, Virgo Supercluster, Known Universe
Contact:

Re: Best code comments

Post by Remie Richards » #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
Byond Username: Cyberboss
Github Username: Cyberboss
Location: Ontario, CA
Contact:

Re: Best code comments

Post by Cyberboss » #336071

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

Re: Best code comments

Post by Qbopper » #336113

pfft
Limey wrote:its too late.
Post Reply

Who is online

Users browsing this forum: No registered users