msburgess3200 / zombiereloaded

Automatically exported from code.google.com/p/zombiereloaded
0 stars 0 forks source link

Frost nade and Light smoke #259

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I'd like to add the following features to zr-dev-base:

 - Frost nade - a flashbang alternative that humans can throw to freeze all zombies around it.

 - Light smoke - a smoke grenade alternative that humans can throw to make light around the final smoke position. Useful for dark maps.

I want to add these features to both ZRiot and ZRc.

How would I do that without duplicating code? Should I wait until the Common 
Interfaces issue solved?

Original issue reported on code.google.com by alon.gub...@gmail.com on 31 May 2011 at 5:34

GoogleCodeExporter commented 9 years ago
Great! These are suitable as class attributes. The actual effect logic could be 
implemented in a library.

You don't need to think of ZRC or ZRiot, these are independent of game mode. I 
don't think we need a common interface for this either since they're 
independent. Parameters would be retrieved from class attributes or cvars.

To make this simple you could just make it a regular module where the feature 
is enabled when the module is (the base handles this, so you only need to focus 
on the actual feature).

Once it's a working module we can convert it to a class attribute module (very 
easy) and move stock functions into libraries. I don't have a class attribute 
module example yet (other than genericattributes.inc), but I'll help you with 
that once we have a working feature. My notes about the class system: 
http://helgeby.no-ip.org/zrdev/basedocs/zr_classes.txt

Suggestion for paremeters (cvars or attribute in a config):

Forost nade:
distance (game units) - how far the forst nade reaches

Light smoke:
brightness (string in config that is parsed to array[4] in code) - color and 
brightness of light

First, just make it a independent module (or two, one for each feature) and 
I'll help organize it into a class attribute later.

Original comment by richard.helgeby@gmail.com on 31 May 2011 at 6:35

GoogleCodeExporter commented 9 years ago
Okay, thank you. Is the new class system already in zr-dev-base, or should I 
work on zr-dev?

Original comment by alon.gub...@gmail.com on 31 May 2011 at 8:27

GoogleCodeExporter commented 9 years ago
It's moved in zr-dev-base now, work on that branch. We only copy stuff we need 
from zr-dev, otherwise it's obsolete.

Original comment by richard.helgeby@gmail.com on 1 Jun 2011 at 6:23