Another DM feature that I didn't know about

It is possible to make simple initializations when you want variables to have values other than the default for the particular type you are creating.

Example:
mob/contents = newlist(
   /obj/scroll/readme {
      name = "Introduction"
      desc = "The fate of Bracolia depends on you ..."
   }
)


This is the most common use of "modified types", but it is not specific to the newlist instruction. Anywhere a type value may be used in DM, it may be followed by a list of initializations. The general syntax for a modified types is:

path {var1 = val1; var2 = val2}

The semicolon is necessary if you put several variable assignments on the same line. The braces are necessary, even though they are generally optional in DM (since the compiler looks at your indentation). The reason is that the path + initializations must be parsed as a single expression, which is a different context from the usual use of braces in DM when you are defining a true type. Also, indentation inside of an argument list is always ignored anyway.



I knew about the newlist proc, but had no idea it could be used to make modified instances, nor did I have any idea that the same syntax can be used elsewhere in DM!

Go forth and multiply!

Posted by Jtgibson on Sunday, April 27, 2008 12:38PM - 4 comments / Members say: yea +0, nay -0

An important reminder

Just 288 shopping days until Christmas!

Posted by Jtgibson on Tuesday, March 11, 2008 12:43PM - 3 comments / Members say: yea +0, nay -0

jt_options

From this:

option/Test_Checkbox
    desc = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Vivamus \
		vulputate libero nec ante. Cras tristique suscipit ipsum. Class aptent \
		taciti sociosqu ad litora torquent per conubia nostra, per inceptos \
		hymenaeos. Morbi dignissim purus sed turpis. Suspendisse rhoncus eros id \
		erat venenatis dignissim."

option/Test_Radio
    desc = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla \
		lacus mauris, lobortis et, pellentesque a, lacinia vel, justo. Proin \
		feugiat. Maecenas odio lorem, condimentum nec, euismod vitae, cursus \
		in, nisl. Sed consectetuer vehicula nunc. Etiam eget dolor. Morbi a dui."

    input_type = OPTION_RADIO

    choices = list("Option 1", "Option 2", "Option 3")
    choice_descs = list(
        "Lorem ipsum dolor sit amet, consectetuer adipiscing elit",
        "Lorem ipsum dolor sit amet, consectetuer adipiscing elit",
        "Lorem ipsum dolor sit amet, consectetuer adipiscing elit")

option/Test_Slider
    desc = "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed sit \
		amet enim quis velit dictum rhoncus. Donec dictum risus nec turpis. \
		Donec tempus, urna a feugiat congue, risus dolor semper leo, iaculis \
		facilisis purus lorem in felis. Maecenas pellentesque."

    input_type = OPTION_SLIDER

    min_bound = "Low"
    middle_bound = "Mid"
    max_bound = "High"


To this:



More forthcoming!

Posted by Jtgibson on Friday, February 29, 2008 07:50PM - 4 comments / Members say: yea +0, nay -0

Language is a scalpel, not a bludgeon

The use of "coder" and "codes" and "iconer" and various other brain-dead language has to stop. Use real words, dagnabbit. =P

Posted by Jtgibson on Thursday, February 07, 2008 02:46PM - 8 comments / Members say: yea +0, nay -0

Liberal Crime Squad

Liberal Crime Squad, if you've never heard of it, is a Bay 12 Game brought to you by the same intelligent developers who made Dwarf Fortress. It's old news, mind you; Liberal Crime Squad preceded Dwarf Fortress by two years. But when I see how little it has actually been downloaded, I cry inside.

Liberal Crime Squad is a turn-based management strategy game which features you as a slightly-but-not-significantly-more-sane Tyler Durden (of Fight Club fame). Your goal: to undermine the fabric of Conservative society by committing wanton acts of Liberal disobedience, including stealing from corporations, releasing oppressed sweatshop workers, establishing a disestablishmentarian newspaper which puts its own spin on the crimes you commit, and indoctrinating evil Conservatives through kidnap and torture. (Hey, it's justifiable in the Liberal Plan.)

The game is exceedingly humourous and is a satirical take on the extreme left and the extreme right. If you commit an offence bad enough to land you 20 years of prison time, when you get outside you can just see the sorts of malfeasant Conservatism that have gripped the nation.

Bear in mind that the game is not intended for children. It includes swearing, violence, sexual situations, etc.

Content advisories aside, you can download the open-source version from SourceForge.

Sangre y Libertad!

Posted by Jtgibson on Wednesday, January 02, 2008 01:51PM - 1 comment / Members say: yea +0, nay -0
(Edited on Wednesday, January 02, 2008 02:11PM)