Page 2 of 2

Re: Best code comments

PostPosted: Tue Sep 12, 2017 7:57 pm
by Qbopper
pfft

Re: Best code comments

PostPosted: Fri Nov 17, 2017 9:38 pm
by ShizCalev
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 //
//////////////

Re: Best code comments

PostPosted: Sat Nov 18, 2017 9:40 am
by duncathan
fuck_you_dir is an age old classic. remie's naming conventions are certainly easy to distinguish

Re: Best code comments

PostPosted: Sat Nov 18, 2017 9:51 am
by RandolfTheMeh
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

Re: Best code comments

PostPosted: Sat Nov 18, 2017 10:33 am
by Remie Richards
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.

Re: Best code comments

PostPosted: Sat Nov 18, 2017 11:43 am
by DemonFiren
i'd almost agree with you but your name is remie

Re: Best code comments

PostPosted: Sat Nov 18, 2017 12:15 pm
by Remie Richards
Not a fan of a french name? (on a brit, lmao)

Re: Best code comments

PostPosted: Sat Nov 18, 2017 12:35 pm
by DemonFiren
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

Re: Best code comments

PostPosted: Wed Mar 21, 2018 10:13 pm
by Anonmare
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

Re: Best code comments

PostPosted: Wed Mar 21, 2018 11:33 pm
by DemonFiren
i don't get it

Re: Best code comments

PostPosted: Thu Mar 22, 2018 2:12 am
by Dax Dupont
It's Sympathy for the Devil lyrics as a comment for no reason.

Re: Best code comments

PostPosted: Thu Mar 22, 2018 9:20 am
by DemonFiren
ah, so there is no reason
good

Re: Best code comments

PostPosted: Mon May 07, 2018 3:23 am
by kevinz000
Image

Re: Best code comments

PostPosted: Mon May 07, 2018 5:41 am
by Denton
Code: Select all
new/obj/item/reagent_containers/food/snacks/pastatomato(get_turf(H)) //now that's what I call spaghetti code

Re: Best code comments

PostPosted: Wed Jul 18, 2018 9:54 pm
by CreationPro
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

Re: Best code comments

PostPosted: Wed Jul 18, 2018 11:10 pm
by DemonFiren
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

Re: Best code comments

PostPosted: Sun Jan 13, 2019 8:14 pm
by bandit
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

Re: Best code comments

PostPosted: Sat Sep 14, 2019 10:25 pm
by PKPenguin321
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.")

Re: Best code comments

PostPosted: Sun Sep 15, 2019 12:23 am
by Whoneedspacee
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

Re: Best code comments

PostPosted: Tue Sep 17, 2019 8:48 pm
by Reyn
No specific examples but in class I had a habit of sneaking shitposts into code via comments.

Re: Best code comments

PostPosted: Sun Sep 29, 2019 1:53 am
by bandit
found by shaps

Code: Select all
//Aiming for 1.5 hours to max R&D
   //[88nodes * 5000points/node] / [1.5hr * 90min/hr * 60s/min]

Re: Best code comments

PostPosted: Mon Sep 30, 2019 5:17 pm
by XDTM
It's clearly accounting for time dilation

Re: Best code comments

PostPosted: Fri Oct 25, 2019 4:33 pm
by bandit
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

Re: Best code comments

PostPosted: Fri Nov 08, 2019 2:39 am
by Sandshark808
Not a comment, but...
/obj/item/reagent_containers/food/snacks/urinalcake

Re: Best code comments

PostPosted: Fri Nov 08, 2019 7:17 am
by cacogen
>see paprika thread in unread posts
>briefly panic until I see the creation date

Re: Best code comments

PostPosted: Thu Dec 05, 2019 8:01 pm
by ATHATH
The comments in hydroponics.dm (https://github.com/tgstation/tgstation/ ... oponics.dm) are quite good, both in how they explain what's happening/what does what and in humor in the section for dealing with adding special chemicals to a plant tray.

Re: Best code comments

PostPosted: Thu Dec 05, 2019 8:08 pm
by ATHATH
The comments in revenant_abilities.dm that specifically warn admins not to give non-revenants revenant powers (right next to the code that makes those powers still able to work (and not cost any essence) when cast by non-revenants) are pretty funny: https://github.com/tgstation/tgstation/ ... ilities.dm

Re: Best code comments

PostPosted: Fri Dec 06, 2019 7:37 am
by terranaut
Code: Select all
if(!is_operational()) //you cant use broken machine you chumbis

Re: Best code comments

PostPosted: Wed Dec 11, 2019 9:20 pm
by Yenwodyah
Code: Select all
/obj/item/melee/touch_attack/fleshtostone/afterattack(atom/target, mob/living/carbon/user, proximity)
   if(!proximity || target == user || !isliving(target) || !iscarbon(user)) //getting hard after touching yourself would also be bad
      return