Vox mutantrace, vox clothing, minor surgery mod for mutantrace specific surgery steps. Fixed captain's jacket sprite.

This commit is contained in:
Zuhayr
2013-06-05 17:35:38 +09:30
parent 114e04ee9f
commit 06f04e6374
19 changed files with 163 additions and 15 deletions
+19 -1
View File
@@ -5,6 +5,9 @@
// type path referencing tools that can be used for this step, and how well are they suited for it
var/list/allowed_tools = null
// type paths referencing mutantraces that this step applies to.
var/list/allowed_species = null
var/list/disallowed_species = null
// duration of the step
var/min_duration = 0
@@ -22,6 +25,21 @@
return allowed_tools[T]
return 0
// Checks if this step applies to the mutantrace of the user.
proc/is_valid_mutantrace(mob/living/carbon/human/target)
if(allowed_species)
for(var/species in allowed_species)
if(target.dna.mutantrace == species)
return 1
if(disallowed_species)
for(var/species in disallowed_species)
if (target.dna.mutantrace == species)
return 0
return 1
// checks whether this step can be applied with the given user and target
proc/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
return 0
@@ -63,7 +81,7 @@ proc/do_surgery(mob/living/M, mob/living/user, obj/item/tool)
return 0
for(var/datum/surgery_step/S in surgery_steps)
//check if tool is right or close enough and if this step is possible
if( S.tool_quality(tool) && S.can_use(user, M, user.zone_sel.selecting, tool))
if( S.tool_quality(tool) && S.can_use(user, M, user.zone_sel.selecting, tool) && S.is_valid_mutantrace(M))
S.begin_step(user, M, user.zone_sel.selecting, tool) //start on it
//We had proper tools! (or RNG smiled.) and User did not move or change hands.
if( prob(S.tool_quality(tool)) && do_mob(user, M, rand(S.min_duration, S.max_duration)))