Page 1 of 1

SDQL2 messery and tomhooligans

Posted: Sun Apr 28, 2019 6:40 am
by JJRcop
Please move this to a better board if this is the wrong one. Just post SDQL queries that cause fun.

SDQL is a powerful yet inefficient and unintuitive/sloppy (read horrible) language for complex behavior. It should probably have a better substitute.

I spent too much time cooking up a fire-and-forget cinematic round ender (literally it ends the round for you) that drops a tesla missile at your current location in about a minute after a short series of announcements.

Code: Select all

USING SEQUENTIAL = TRUE CALL global._new(/obj/structure/closet/supplypod, [src]) ON * IN global._locate(1, 1, 1);
CALL global.generate_items_inside([/obj/item/grenade/clusterbuster: 1], src) ON /obj/structure/closet/supplypod IN (global._locate(1, 1, 1)).contents;
UPDATE /obj/item/grenade/clusterbuster IN (@[/obj/structure/closet/supplypod IN (global._locate(1, 1, 1)).contents MAP contents])[1] SET payload = /obj/energy_ball, det_time = 715;
UPDATE /obj/structure/closet/supplypod IN (global._locate(1, 1, 1)).contents SET effectStealth = TRUE, delays = ["1": 605, "2": 4, "3": 97, "4": 30];
CALL setStyle(8) ON /obj/structure/closet/supplypod IN (global._locate(1, 1, 1)).contents;
CALL arm_grenade() ON /obj/item/grenade/clusterbuster IN (@[/obj/structure/closet/supplypod IN (global._locate(1, 1, 1)).contents MAP contents])[1];
CALL global._new(/obj/effect/pod_landingzone, [global._get_step(usr, 0), src]) ON /obj/structure/closet/supplypod IN (global._locate(1, 1, 1)).contents;
CALL global._addtimer(global._new(/datum/callback, [src, "reset_perspective", global._get_step(usr, 0)]), 555) ON /mob IN global.player_list;
CALL global._addtimer(global._new(/datum/callback, ["some_magic_bullshit", "/proc/priority_announce", "Proximity sensors picked up a small object with a heavy electromagnetic signature. It is moving, however trajectory models indicate we will miss it.", "Proximity Alert"]), 30) ON * IN usr;
CALL global._addtimer(global._new(/datum/callback, ["some_magic_bullshit", "/proc/priority_announce", "The object is slowing down and changing course. Stand by.", "Proximity Alert"]), 270) ON * IN usr;
CALL global._addtimer(global._new(/datum/callback, ["some_magic_bullshit", "/proc/priority_announce", "Object identified as SyHOK-class warhead. It is tracking " + global.station_name() + ".", "Proximity Alert"]), 450) ON * IN usr;
CALL global._addtimer(global._new(/datum/callback, ["some_magic_bullshit", "/proc/set_security_level", "delta"]), 480) ON * IN usr;
CALL global._addtimer(global._new(/datum/callback, ["some_magic_bullshit", "/proc/sound_to_playing_players", "sound/misc/airraid.ogg"]), 490) ON * IN usr;
CALL global._addtimer(global._new(/datum/callback, ["some_magic_bullshit", "/proc/sound_to_playing_players", "sound/misc/airraid.ogg"]), 550) ON * IN usr;
CALL global._addtimer(global._new(/datum/callback, ["some_magic_bullshit", "/proc/sound_to_playing_players", "sound/misc/airraid.ogg"]), 610) ON * IN usr;
CALL global._addtimer(global._new(/datum/callback, ["some_magic_bullshit", "/proc/sound_to_playing_players", "sound/magic/lightning_chargeup.ogg"]), 616) ON * IN usr;
CALL global._addtimer(global._new(/datum/callback, ["some_magic_bullshit", "/proc/sound_to_playing_players", "sound/magic/lightning_chargeup.ogg"]), 617) ON * IN usr;
CALL global._addtimer(global._new(/datum/callback, ["some_magic_bullshit", "/proc/sound_to_playing_players", "sound/magic/lightning_chargeup.ogg"]), 621) ON * IN usr;
CALL global._addtimer(global._new(/datum/callback, ["some_magic_bullshit", "/proc/sound_to_playing_players", "sound/magic/lightning_chargeup.ogg"]), 624) ON * IN usr;
CALL global._addtimer(global._new(/datum/callback, ["some_magic_bullshit", "/proc/sound_to_playing_players", "sound/misc/airraid.ogg"]), 670) ON * IN usr;
CALL global._addtimer(global._new(/datum/callback, ["some_magic_bullshit", "/proc/sound_to_playing_players", "sound/misc/airraid.ogg"]), 730) ON * IN usr;
CALL global._addtimer(global._new(/datum/callback, ["some_magic_bullshit", "/proc/sound_to_playing_players", "sound/misc/airraid.ogg"]), 790) ON * IN usr;
CALL global._addtimer(global._new(/datum/callback, ["some_magic_bullshit", "/proc/sound_to_playing_players", "sound/misc/airraid.ogg"]), 850) ON * IN usr;
CALL global._addtimer(global._new(/datum/callback, [src, "reset_perspective", src]), 790) ON /mob IN global.player_list;
CALL global._addtimer(global._new(/datum/callback, ["some_magic_bullshit", "/proc/___callbackvarset", SSticker, "force_ending", TRUE]), 790) ON * IN usr;
(haha most of it is queuing up the air raid siren a bunch of times because there's no for loops, it's not designed for this)

Re: SDQL2 messery and tomhooligans

Posted: Fri May 03, 2019 11:17 am
by Not-Dorsidarf
You can do sqdl things other than rename everyone “Meow Micks?”