Brotato

Brotato

509 ratings
原版信号补充-Original Signal Supplement
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
137.216 KB
19 Apr, 2023 @ 12:41am
29 Jan @ 7:02am
37 Change Notes ( view )

Subscribe to download
原版信号补充-Original Signal Supplement

Description
更新Update
修复一个导致中后期商店闪退的bug


简介Introduction
作为其他mod的前置mod,补充原版的一些关键信号,方便mod制作。
(由于mod载入顺序的不同,若无法连接信号,请使用call_deferred或yield推迟连接时点)
As a required mod for others, to add some significant signals, make the mod-make more convenient.
(In case of the time of mod loadding are different, if some signal can not be connected, please use 'call_deferred' or 'yield' to delay the connect-time)
------------
AutoLoad class RunData
--新增信号 New Signal--
signal onWaveStart(mainScene:Node,player:Player) #敌袭开始时触发 On wave start
signal onWaveEnd(inTitle:bool) #敌袭结束(若通过返回标题界面离开游戏,inTitle为True) On wave end (if end game by 'back to title',inTitle = true )
signal onUnitTakeDmg(unit,damage_info)#同上,但可通过修改damage_info中的属性来改变take_damage的结果 As above,but can change the variant in damage_info to change the result of func take_damage(..)
signal onEnterShop(shop:Shop) #进入商店时触发 when come to Shop
signal onWeaponUpdate(current_weapons:Array) #敌袭中的武器实例发生变化时触发 On the weapon nodes changed during wave
signal onReset(restart:bool) #RunData重置时 on RunData reset
signal onAddItem(item:ItemData) #当获得道具时 On take or buy item
signal onDelItem(item:ItemData) #当删除道具时 On remove item
signal onAddWeapon(new_weapon:WeaponData,isStarting:bool) #当获得武器时 On get weapon
signal onUpdateSet(active_sets:Array) #当武器羁绊更新时 On weapon sets updated
signal onInitEffects(now_effects)#当效果列表初始化时(当前effects字典,可用merge插入新effects) On effects dictionary init(now effects dic,can merge)
signal onCharacterSelectUiShow(node)#当进入角色选择界面时 On select character Panel show
signal onItemInstanceAdded(icon_button:InventoryElement) #物品图标添加时 On item icon button show
signal onItemUiShow(ui_node:ItemPanelUI) #物品信息UI显示时 On item Popup UI show
signal onFocusManageReady(focus_manage:FocusManage) #On FocusManage ready,this is after init()
signal onSettingMenuReady(menu_node) #设置菜单准备完成 on Menus ready

------------
res:\\main.gd
--新增信号 New Signal--
signal onEnemyDied(enemy:Enemy)#敌人死亡时 On enemy died
signal onPickedConSumableStart(consumable:Node) #当捡起消耗品时(消耗品效果尚未处理) On pick up consumable(effects not apply yet)
signal onPickedGoldStart(gold:Node) #当捡起材料时(材料价值未处理) On pick up gold (gold value not calculate yet)
signal onCleanUpRoom(is_last_wave:bool,is_run_lost:bool,is_run_won:bool) #敌袭结束或玩家死亡 On wave end or player died
------------
AutoLoad ItemService
--新增信号 New Signal--
signal onTiersDataReset() #道具池字典初始化 item Pool dictionary init
signal onUnlockedPoolInit() #道具池初始化 Item Pool init
------------
class Shop
--新增信号 New Signal--
signal onSetRerollPrice() #设置刷新物品价格时 on set the price of reroll button
signal onWeaponCombined(weapon_data,is_upgrade) #合成武器时
signal onWeaponDiscard(weapon_data) #回收武器时
signal onShopItemsReset(now_shop_items:Array) #商店物品列表刷新时 On reroll button pressed
signal onSetRerollPriceStart() #将要设置刷新价格 When set reroll price start
signal onShopItemsResetStart()#商店将要刷新物品 Shop want to reset items
signal onSetShopItemsStart(items_data:Array)#商店物品开始设置前 When reset items stat
signal onSetShopItems(items_data)#商店物品设置完毕 items reset end
signal onReloadShopItems() # when reload_shop_items_descriptions end
signal onShopItemBoughtStart(shop_item) # when buy button pressed
signal onShopItemBought(shop_item) #when shop item bought end

func set_next_reroll_price(value:int)#改变下次刷新按钮的价格 to change the next reroll_button price
func set_next_shop_items_data(items_data:Array):#变更下次刷新时的商店物品,可配合信号"onSetShopItemsStart"使用 change the items in shop at next reroll
------------
AutoLoad Utils
func get_current_scene()->Node: #return current_scene of current_tree
func wave_not_end(timeout:bool=false)->bool: #返回是否正在敌袭中 (是否需要判断倒计时大于零) if the Main is end (if cleanning_up)
func floating_text(content:String, direction:Vector2, duration:float, spread:float, color:Color = Color.white, all_caps:bool = false)->void :
func is_custom_class(obj:Object,parent_script:Script)->bool:#与 'is' 的用法相似,返回目标object是否为某脚本parent_script。可避免take_over_path导致继承关系中断使 'is' 失效的问题。 the same as key word 'is' ,but can void the problem of "Enemy is Enemy -> false" caused by take_over_path
func del_all_bbcode(strs:String)->String:#删除文本中的bbcode代码,跳过包含except_words的字段 Delete all bbcode in String,skip result include except_words
func get_mod_by_name(mod_name:String)->ModData or Null: #通过模组名字(不加作者名)获取模组数据 Get mod data by mod name (without author name)
func popup_dialog(title:String,text:String):->Node or Null#弹出一个消息窗口,如果已经有活跃窗口,则进入等待序列。 Popup a info window, if an other dialog window is showing , new text will in waiting queue.
func popup_text(txt:String,time:float=0.5,pos=Vector2.ZERO):#弹出一行文字。 popup a text label to show info
------------
AutoLoad SoundManager
func play_single(sound_id:String,sound:Resource,volume_mod:float,pitch_rand:float,always_play:bool)->void:#播放音效,但同id的音效在同一时间只会播放一次。play sound with the same id only once, pls dont' use the same id for diffent resource
------------
class Enemy
func add_force_knockback(knockback_vector=Vector2.ZERO): #增加强制击退 add knockback ignored knockback_resistance
------------
class Boss
func add_force_knockback(knockback_vector=Vector2.ZERO): #增加强制击退 add knockback ignored knockback_resistance
------------
AutoLoad ProgressData
var API_VERSION:String
func get_api_version()->String:#use this to get the version of signalAPI

-----------
class Player
signal onPlayerTakeDmg(unit,damage_info)#玩家受伤时,可通过修改damage_info中的属性来改变take_damage()的结果
signal onPlayerHealStart(player,damage_info)#玩家治疗时,可通过修改damage_info中的属性来改变heal()的结果。 On player healing, can change the variant in damage_info to change the result of func heal(..)

var addition_iframes:float = 0.0 #使用该变量改变玩家无敌时间 change this variant to change the wait time of invinciblility_timer

========
AutoLoad WeaponService
signal onInitMeleeStats(new_stats,from_stats,weapon_id) #初始化近战数据
signal onInitRangedStats(new_stats,from_stats,weapon_id)#初始化远程数据
signal onInitBurningData(new_burning_data,base_burning_data)#初始化燃烧数据
signal onSpawnProjectile(projectile,from_stat,from,damage_tracking_key)#生成子弹
signal onSpawnSpecialProjectile(projectile,from_stat,entity_from,damage_tracking_key)#生成特殊子弹
signal onExplode(instance,from_effect,damage_tracking_key) #生成爆炸

func spawn_projectile_from_weapon(weapon,ranged_stats,position=Vector2.ZERO,rotate=true)->Node:从武器发射投射物 Shot projectile from given weapon, this func is added for melee weapon.
58 Comments
K41RY 2 Sep @ 12:46am 
Absolute bad. When used with the new system it just doesnt work. Take a look at your code.
瘦瘦的肥猫 22 Aug @ 7:08am 
崩溃:wave:21 type:1 tier:-1 from_tier:-1 branch:1 item:null
无敌佳佳子 26 Jul @ 7:24pm 
商店中出现一个名字叫崩溃的道具,它显示与mod“V联盟”的“神奇的格斗拳套”会导致商店崩溃
堇尘 10 Jul @ 2:28pm 
我认为这个模组可以好好优化一下,因为bug有点严重影响正常游玩了,尤其是想要玩无尽模式的时候尤为明显
堇尘 3 Jul @ 11:10pm 
不要和Tianjing-ViolenceAesthetics,因为二者冲突会导致卡在选难度界面
NA73 12 Apr @ 2:46am 
打伤害崩溃
Tiga_TPC 6 Apr @ 3:38am 
加了这个模组之后,一打出伤害就闪退游戏,什么情况?
ABCD 27 Mar @ 5:59pm 
BUG:V联萌:白龙贺岁篇-VLeague: Happy Loong Year [v1.10b]【EN/CN】 道具:辰龙爆竹
楸树梅子酒 19 Mar @ 8:16am 
https://steamproxy.net/profiles/76561198043678304/screenshot/2456223385927367886/
安装元素兄弟mod后出现的商店崩溃BUG,道具效果为+6幸运+6攻速+6闪避:d2rubick:
tkt9k2562 22 Feb @ 3:32am 
我遇到了一個 BUG

商店道具名為崩潰

圖片內容為 :
+6運氣 +6攻速 +6迴避
商店出現了一個導致崩潰的問題(已修復) , 擷圖發給 mod (signalAPI) 的作者

wave 1 , type 1 , tier 0, from_tier 0, branch 2 , item 醜牙

我懷疑是 Chromium-BetterBoxes 或著 Tianjing-ViolenceAesthetics
這兩個 mod 是我剛裝上去的


其他的 mod 我之前就有安裝 , 都沒事

包括 Aria-touhoucosplay , Extatonion Mod , 元素兄弟

除此之外還裝了 [Pack] Mashtato 和 zxc-CXtato 和 属性来源分离Split Stat From