ExcidiumStation / SCP-13

Stage. Commit. Push. 13 times.
GNU Affero General Public License v3.0
2 stars 3 forks source link

SCP-914 #5

Open ghost opened 6 years ago

ghost commented 6 years ago

Clockwork

image Full description: http://www.scp-wiki.net/scp-914 Merged in #3

Clockwork component:

You can add clockwork behaviour to any /atom/movable (includes /mob, /obj), which makes them anchored and dense, spawning a switch on them which you can turn (counter)clockwise.

To add clockwork component to object:

/obj/example/Initialize()
      . = ..() // Don't forget to add this, it calls parent entity, which is *REQUIRED*
      AddComponent(/datum/component/clockwork) 

Clockwork recipes:

Transformations are performed through atom/movable/scp914_act(mode) which then calls one of the following procs based on mode:

/atom/movable/proc/scp914_rough()
/atom/movable/proc/scp914_coarse()
/atom/movable/proc/scp914_one()
/atom/movable/proc/scp914_fine()
/atom/movable/proc/scp914_vfine()

They use specified lists:

var/list/scp914_rough
var/list/scp914_coarse
var/list/scp914_oneone
var/list/scp914_fine
var/list/scp914_vfine

Just put in corresponding lists all objects you want your item to transform into, you can override procs (however DONT TOUCH scp914_act, and don't forget to call parent) to additional EFFECTS for desired entity type. They must return atom/movable

To add recipe:

/obj/item
var/list/scp914_rough = list(/obj/item1)
var/list/scp914_coarse = list(/obj/item2)
var/list/scp914_oneone = list(/obj/item3)
var/list/scp914_fine = list(/obj/item4)
var/list/scp914_vfine = list(/obj/item5, /obj/item6)

To add effects:

/obj/item/example/scp914_fine() //example for FINE mode, returns resulting obj!
    do_sparks()
    ..()// return result

To pass parameter from original object to result object:

/obj/item/example/scp914_transfer(var/atom/movable/product)
    product.desc = desc
    product.some_var = some_var
    return product

TODO:

ghost commented 6 years ago

Unironically finished

ghost commented 6 years ago

Unironically I forgot IT'S NOT FINISHED