Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Quick Reply
Search this Thread
Lab Assistant
Original Poster
#1 Old 21st Feb 2015 at 10:07 AM
Default Does not work display Pie menu on the Sim.
Hello.
I'm trying to get work simple Pie Menu on sim. For base example I use Preganancy Mega Mod.
I've made Pie Menu file
Code:
== == == == == == == == == == == == == == == == ==
 **  Fallback preview:  data may be incomplete  ** 
== == == == == == == == == == == == == == == == ==


<?xml version="1.0" encoding="UTF-8"?>
<I c="PieMenuCategory" i="pie_menu_category" m="interactions.pie_menu_category" n="kh_MyFirstInMainMen" s="15065834760452434633">
  <T n="_collapsible">False</T>
  <T n="_display_name">MyTestMenu!!!</T>  <!--"Pregnancy"-->
</I>

Interaction
Code:
<?xml version="1.0" encoding="UTF-8"?>
<I c="CommandSuperInteraction" i="interaction" m="interactions.base.immediate_interaction" 
   n="kh_MyFirstInteraction" s="15458296736198698361">
    <V t="participant" n="_icon">
        <U n="participant">
            <L n="participant_type">
                <E>Actor</E>
            </L>
        </U>
    </V>
    <V t="disabled" n="_saveable"/>
    <T n="attention_cost">0.5</T>
    <T n="category">15065834760452434633</T>  <!--MTS_Scumbumbo_PregnancySetStage-->
    <T n="command">pregnancymod.setfirsttrimester</T>
    <T n="display_name">!!!MyTestMenu!!!</T>  <!--"First Trimester"-->
    <U n="display_name_text_tokens">
        <L n="tokens">
            <V t="participant_type">
                <U n="participant_type">
                    <E n="participant">Actor</E>
                </U>
            </V>
            <V t="participant_type">
                <U n="participant_type">
                    <E n="participant">Object</E>
                </U>
            </V>
        </L>
    </U>
    <U n="progress_bar_enabled">
        <T n="bar_enabled">False</T>
    </U>
    <E n="scoring_priority">NORMAL</E>
    <E n="target_type">OBJECT</E>
  
    <T n="time_overhead">30</T>
</I>

And code for injection
Code:
import services
import injector
import objects
import types

pregnancy_mod_sa_instance_ids = (15458296736198698361)

@injector.inject_to(sims.sim.Sim, 'on_add')
def pregnancymod_add_super_affordances(original, self):
    original(self)
    sa_list = []
    affordance_manager = services.affordance_manager()
    for sa_id in pregnancy_mod_sa_instance_ids:
        tuning_class = affordance_manager.get(sa_id)
        if not tuning_class is None:
            sa_list.append(tuning_class)
    self._super_affordances = self._super_affordances + tuple(sa_list)

But when I click on sim - on target or on active - my menu doesn't show.
Attached files:
File Type: zip  Mods.zip (3.0 KB, 5 downloads) - View custom content
Back to top