Jump to content

Shadow Assassin

Member
  • Content Count

    2,884
  • Joined

  • Last Visited

  • Most Liked  

    1

Everything posted by Shadow Assassin

  1. How would I go about creating this?

    No worries. Odd that the function didn't work, it should have. Regardless, jQuery has the functions appendTo() and which does the same thing It's good to code in native/pure Javascript rather than using a framework like jQuery because it gives you the opportunity to understand what each function does. However, it smooths out a lot of the cross-browser issues... I didn't get an opportunity to respond to you in chat about the rewriting of code, but there are numerous API functions that would help in jQuery. Try creating a custom jQuery function that handles loading for you: jQuery.fn.loadRoom = function( xml, roomtype ) { var html = ''; $.get( xml, function() { $(roomtype).find('Variant').each( function() { var $variant = $(this); var $variantPopulation = $($variant).find('Population').text(); var $variantDescription = $($variant).find('Description').text(); var $variantDayImage = $($variant).find('dayImage').text(); html = '[img=https://community.simtropolis.com/topic/63220-how-would-i-go-about-creating-this/'%20+%20$variantDayImage%20+']'; html += 'Population Count: ' + $variantPopulation + ''; html += 'Description: ' + $variantDescription + ''; }); }); $(html).appendTo(this); return true; } $('table').loadRoom( 'OT_Office.xml', 'Office' ); Give that a try, it may not work but it will give you somewhere to start. You can read about building plugins (this is the most efficient option): http://learn.jquery.com/plugins/basic-plugin-creation/ EDIT: Just so you know, any Javascript function that handles HTML directly can add malicious scripts. It is, therefore, up to you to keep a close eye on it, and escape data inputs yourself. But as I said, that's not the only problem with document.write(), it's because it will rewrite the entire DOM and you don't want to do that for both maintenance and performance reasons.
  2. How would I go about creating this?

    document.write(x[i].getElementsByTagName("dayImage")[0].childNodes[0].nodeValue); It needs to go inside an <img> tag, but you shouldn't use document.write, as it actually rewrites the entire page and can cause problems, particularly if you do heavy DOM manipulation. It's really only intended to be used before the page finishes loading. You should be using .insertAdjacentHTML instead as it's safer. More details here. (btw, this is a very useful resource for gauging cross-browser compatibility with native JS)
  3. Reddonquixote's BAT thread

    Probably a side-effect of Melbourne's crappy soil. And yes... I do agree abotu Sydney being a nice place to visit but not a nice place to live Love your BATs, though - what are you going to do when you've recreated everything in Melbourne?
  4. Show us What you're Working On

    That's what I've been busy with
  5. Show us your Nature!

    It's this one Looking good, everyone - hopefully I can post something here eventually...
  6. Index of Display Name Changes

    Just a FYI, when the name change tool came out, I dropped the _ Shadow_Assassin -> Shadow Assassin I may change this in future though but I doubt I will.
  7. Desktop.. Everyone has one of these!

    Lots of things - modding, web dev, programming, whatever takes my fancy, really. Current wallpaper (had to reformat my main drive a week or so ago - so annoying):
  8. Desktop.. Everyone has one of these!

    3840x1080 - it's a dual-screen setup. Windows 8.1's multi-monitor support is far, far superior to that of Windows 7.
  9. Desktop.. Everyone has one of these!

    My current desktop.
  10. occasional Postcode A2 with 2nd HDD

    It is possible that it could be an issue with the IDE controller. Quick look-around shows the possibility that it could be your 2TB drive taking time to spin up. Debug code A2 should show normally for a second or two, but it could be something else. https://forum-en.msi.com/index.php?topic=166987.0
  11. Show us your City Transit Maps!

    I like how the City Loop Circle is like a vortex, dragging everything into it.
  12. Show us What you're Working On

    Something buried deep in my stash of images... Gonna go back work on it some more when I have time. This was taken earlier this month
  13. Show us Your Interchanges!

    Just playing around with something small in SC4. Obviously not finished, haha
  14. OK, a lot of the problems here with IE11 is because two things happened: 1. Microsoft changed user agent (from MSIE to Edge), so none of the IE hacks work anymore; 2. They're vaguely approaching standards now, which is nice and all, but ironically this breaks sites because of #1. 3. They changed a LOT of things under the hood, including the rendering engine There's honestly nothing ST can do, it's all up to the software developers. So, perhaps for now... use Chrome (which has its own problems with ST chat, once again because of crappy developers)? Or Firefox? Or even... Opera? But then you'd lose the rich text editor (though this is no longer as relevant now they've changed rendering engine)
  15. Simtropolis 7.3.3 Bugs/Issues Report Thread

    It's a shame RealChat is the best we have because it's pretty buggy, all things considered. I know we tried other chat software but they didn't work very well for what we needed...
  16. The Simtropolis Closet Thread - deux!

    #yoloswag (for the benefit of A Nonny Moose) OK, so homosexuality is the "word of the day", as it were. As far as I'm concerned, I'm not willing to visit Africa, because if they feel that way, it's not worth it. In any case, it's a highly reactive policy - "OMG everyone is getting the AIDS, let's blame teh gheys"... won't be long before they realise the rainbow tide is going to swamp them anyway. Why is it so bad for gay people to marry? What are evangelical Christians so worried about? Are they worried about the revelation that they're living a life of sin because they're wearing cotton mixed with polyester? I think that's the real issue here: they're really worried that the gays will point this out so they try their best to oppress them (within reason, of course). (in case everyone doesn't realise, there's a healthy dose of sarcasm and satire in my post and if they don't realise it, then what the hell are they doing in this thread?)
  17. A Growing Town

    City looks lovely :) The detailing is excellently done.Seems developing on hills is something that comes naturally to you, keep it up!   Though I thought there'd be more Asian-styled housing... :P
  18. Simtropolis 7.3.3 Bugs/Issues Report Thread

    Might want to fix this issue on the STEX... Also turn off PHP error reporting or get it dumped in a log file that's not accessible through a front-end. This is actually a pretty serious security hole. Happened here, and a few other pages on the STEX.
  19. Show us What you're Working On

    Just something I'm working on when I have time
  20. Show us Your Interchanges!

    Going for the Melbourne method of dealing with level crossings, eh, Yoshi? Looks good though! I'm impressed
  21. Roads Spread Out

    Roads Spread Out Come 1971, Whitefall has hit 130,000 citizens. Now that some infrastructure was put into place, people were able to move in and be able to commute to work, do whatever they do at night, and more. So, what we have below is a map showing the status of major roads in the region (click to enlarge) The lengend is self-explanatory: dotted lines are streets that have been designated as major roads but do not yet warrant the traffic volumes required before it can be upgraded. Thin lines are streets that already have been upgraded to roads. Thick lines are avenues... and the fourth level of classification of roads haven't yet been reached... so... yeah. For 1971 region views, they are on the first page. All region views will be put there. One project we'll be looking at is the Whitefall Valley Way widening. Whitefall Valley Way Whitefall Valley Way, a major road in Whitefall's northern suburbs was finally upgraded in early 1971, after numerous complaints from the locals about the heavy freight traffic congestion on the road. 4000 vehicles per hour use Whitefall Valley Way in both directions to get to and from Woodcroft Road to Whitefall Industrial Park, as well as servicing a combined population of approximately 60,000 people. Once the subdivisions east of Whitefall Valley Way have been completed, the road is expected to form a backbone of Whitefall's burgeoning arterial road network. As seen on the map above, Whitefall Valley Way runs between Woodcroft Road (now upgraded in part to an avenue) and Whitefall Industrial Park, where it terminates rather unceremoniously. Whitefall Heights has expanded significantly since the last time we saw it. Some vacant lots are still for sale along Heights Road, also heavily congested but will not be upgraded due to lack of room at the underpass. The train line has seen a significant increase in usage, with about 4000-6000 passengers per hour using this section of the line. To see the full extent of development, click the picture below: Exmouth Whitefall's northernmost suburb at this point is located on the Exmouth Inlet. It forms two parts: Green Point and Exmouth itself. Home to approximately 5,000 people and expected to expand in the future, Exmouth's future is looking bright. It is where the bulk of population growth occurred in the region over the previous year. Exmouth's town centre is also pretty modest for a township of its size. The train line also bisects Exmouth, one of the few towns built around the train line rather than it bypassing a town centre as it has done so previously. Green Point is a modest subdivision located off the Exmouth road. Like the main town, it is expected to expand somewhat in the future. Exmouth also has a motley collection of small farms on the peninsula. As land values rise, it is expected that these farms would be developed over in the near future. That's update 3, folks. Sorry it took so long - RL and an unreliable internet connection delayed this update... but hey, it didn't turn out too bad, I think. What next? Who knows? 1972 could be rather interesting for those in the development industry, with new tiles being opened up for development and more orbital towns being built, with existing cities expanded. Of course, in 1971's region view, it's evident that the towns of Whitefall, North Whitefall and Whitefall River are going to merge together into one big shapeless mass... Farmland on the Whitefall peninsula, where it all began, is in danger...
  22. Let There Be Rail An integral part of Whitefall is its basic rail system. Thirteen stations, one line. Shared with freight. Basic grade-separation on major roads. The rail system was intended to provide a back-bone for the majority of the city as it stands today. (region views are on page 1) The rail system is well-used, being the only means of transport for many people. Trains run every 20 minutes with limited connecting bus services. Today, we look at the first six stations on the network... Whitefall Industrial Park The current terminus of the main line that runs through Whitefall, Whitefall Industrial Park is the most heavily used station on the network, with an average of 1500 passengers per hour passing through its doors. Whitefall Industrial Park station also has the freight and rail maintenance yard located next to it, making this particular station very important to the entire network. It services the industrial park and much of the northern-most suburbs of Whitefall. One of Whitefall's largest single employers is located here: Joseph Rank Ltd. A flour mill that was constructed to provide the region with finely-milled high-quality flour, the facility employs 1805 people. In a classic example of vertical integration, a number of wheat farms and bakeries also fall under the Joseph Rank banner. Castlemaine Street The next station on the line is no less important, either. Completely surrounded by development, it is an important interchange station providing connecting services to nearby Whitefall North Station by bus. The catchment is entirely residential. Whitefall's only radio station is also located here. Whitefall North Another terminus station, for the spur line, Whitefall North is located close to the State Fair and the town centre. However, it suffers from infrequent services, so the station is basically underused. Whitefall State Fair is a popular attraction, located conveniently close to transport. The station for North Whitefall originally stood across the road until a decision was made to move it further into town to provide better transport options for these people in the southern part of North Whitefall. Whitefall Heights Back on the main line, Whitefall Heights is the last station before the rail line enters the tunnel under the subdivisions of Whitefall Heights. Located next to a smaller hamlet that is technically part of North Whitefall, Whitefall Heights has not changed much compared to the rest of the city. Located at a busy intersection, Whitefall Heights is also a heavily used station. Whitefall Heights is also the largest suburban subdivision, and provides many nice views over the rest of town to the water, depending on where you live in the Heights. Of course, this comes at a cost: it is one of the more expensive areas in Whitefall, which really isn't saying much, but it is. Whitefall Central Another major station, Whitefall Central is important as it provides service to the majority of Whitefall proper. It is the second-busiest station on the network, with 1250 passengers per hour passing through its doors. It has been planned to become a major hub for many rail lines in the future, however current situations prevent this from happening for upwards of 50 years. Whitefall Central stretches from the Heights to the shores of the Whitefall River. Woodcroft Road The last station on today's tour, Woodcroft Road is one of the busier stations on the network, providing access to the industrial park there. It also is the oldest passenger station on the network, since it was formerly the original terminus for the Whitefall River line before it was extended to Whitefall North. Where to from here? The future of the northern part of Whitefall's rail system is bright. Future extensions will definitely occur, and these will be done over the next 20 years if necessary. Most extension will be done from Whitefall Industrial Park, in Whitefall's northern suburbs. Investments in road infrastructure will go hand-in-hand with the extension of the rail line. Part 2 of this update will go up tomorrow. If not, it will go up Friday. Remember, I update sporadically.
×