Skip to content

Instantly share code, notes, and snippets.

@Limeliz
Last active December 30, 2015 00:39
Show Gist options
  • Save Limeliz/7751326 to your computer and use it in GitHub Desktop.
Save Limeliz/7751326 to your computer and use it in GitHub Desktop.
Would this code work? I'm trying to minimize the amount of copypasta in cult-files. For example here (line 91-127): https://github.com/tgstation/-tg-station/blob/master/code/game/gamemodes/cult/talisman.dm#L91
switch(href_list["rune"])
if("newtome", "emp", "conceal", "communicate", runestun", "armor", "teleport")
var/obj/item/weapon/paper/talisman/T = new /obj/item/weapon/paper/talisman(usr)
usr.put_in_hands(T)
T.imbue = href_list["rune"]
if(href_list["rune"] == "teleport")
T.imbue = "[pick("ire", "ego", "nahlizet", "certum", "veri", "jatkaa", "balaq", "mgar", "karazet", "geeri", "orkan", "allaq")]"
T.info = "[T.imbue]"
if("soulstone")
var/obj/item/device/soulstone/T = new /obj/item/device/soulstone(usr)
usr.put_in_hands(T)
if("construct")
new /obj/structure/constructshell(get_turf(usr))
src.uses--
supply()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment