vaendryl / Sunrider

source code of the visual novel 'Sunrider'
http://sunrider-vn.com/
41 stars 21 forks source link

add dynamic extra fields for modding support to battleship class #121

Open vaendryl opened 9 years ago

vaendryl commented 9 years ago

under def __init__() something like

 for key in store.mod_battleship_fields:
    setattr(self,key,store.mod_battleship_fields[key])
BlueOrange commented 9 years ago

Oooh, mod support:)

Please help me understand the intention here?

On Sunday, November 9, 2014, vaendryl notifications@github.com wrote:

under def init() something like

for key in store.mod_battleship_fields: setattr(self,key,store.mod_battleship_fields[key])

— Reply to this email directly or view it on GitHub https://github.com/vaendryl/Sunrider/issues/121.

EnderShadow commented 9 years ago

I think it's for allowing modders to add attributes to other ships without modifying any core classes.