PTR Changelog 2016-05-10


  • Dev Team

    • Renamed StructureNuke prototype into StructureNuker.
    • Renamed STRUCTURE_NUKE constant into STRUCTURE_NUKER.


  • Thank you for removing the ambiguity in the name STRUCTURE_NUKE, which made it sound expendable. However, I think, the new name is not a real improvement. Just adding a R at the end does not provide enough lexical distance to NUKE. The R is easily overlooked and typos are hard to spot this way.

    I suggest:

    STRUCTURE[_NUKE|ROCKET]_SILO

    or

    STRUCTURE[_NUKE|ROCKET]_LAUNCHER

     



  • Also, please notify us, when updating the PTR. At least a oneliner in the IRC channel like "resetting PTR in 10 minutes" would make it able to save your work and not constantly wondering what happened.


  • Dev Team

    We don't want to introduce any real-world terms in the game. There is no "rockets" or "missiles" on the Screeps planet. Screeps naming is mostly computer-themed. The term "nuke" means not only a nuclear missile, but also a kind of DoS attack. There is also an established term "nuker" related to it.

    The R is easily overlooked and typos are hard to spot this way.

    Could you please elaborate? How can Nuke and StructureNuker be typo'ed by a single character?



  • I'm talking about the Levenshtein distance between Nuke and Nuker and the human habit of interpolating words. As you may know, you are not reading entire words but rather abstracting them. Thus StructureNuke and StructureNuker have to small LD, to be easily recognizable, especially when you are having another Object that is already called Nuke, which creates assumption bias. It basically violates best practices of naming conventions.

    And about your computer-themed world, sorry for being ignorant, but so far I didn't realize you had a theme and also I'm not aware of a computer term for e.G. "minerals" nor do i see any other (easily recognizable) terms related to computing. Anyway, the word nuke in IT is a derivate from the real-life "nuclear warhead", soas of now, you already have plenty of real-life terms in the game.

    Just to be clear, I definitely would like to see a consistent theme for the screeps world, I just don't recognize it atm.


  • Culture

    Filling a StructureNuker using creep.transfer(nuker, RESOURCE_ENERGY) yields a -7 invalid target now.

     

     

    Creep.prototype.transfer uses this check:

     

    && register.structures[target.id].structureType != 'nuke'

     

    Same with ghodium:

     

    else if (target.structureType == 'nuke') {
    if (resourceType != C.RESOURCE_ENERGY && resourceType != C.RESOURCE_GHODIUM) {
    return C.ERR_FULL;
    }

     

     

    isn't it better to use the constants in this file as well?

    Like so:

    https://gist.github.com/ButAds/ba13955589d1e13b549ba8a85ca0ba36 

     

     

     


  • Dev Team

    Thus StructureNuke and StructureNuker have to small LD

    As there is no StructureNuke keyword in the game, that doesn’t seem to be a problem.

    Just to be clear, I definitely would like to see a consistent theme for the screeps world, I just don’t recognize it atm.

    Controller, extension, storage, source, spawn, link, energy, power - all these terms are computer-themed.

    Filling a StructureNuker using creep.transfer(nuker, RESOURCE_ENERGY) yields a -7 invalid target now.

    Fixed.



  • AFAIK if you want to change the name you can just do something like

    if (StructureNuker) {
        var StructureNukeSilo = StructureNuker;
        var StructureNukeTarget = Nuke;
    }