mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 20:20:33 +01:00
This tail refactor turned into an organ refactor. Funny how that works. (#67017)
* Fuck you (refactors ur tails) * Errors * Wow. Pain. * Fixes up probably everything * finish up here * Fixes hard del maybe * original owner hard del * garbage collection runtime * suck my peen byond * Mapped tails * motherfucker. * motherrfucker. again. * Whooopppppsie * yeah bad idea * Turns out external organs literally just sat in nullspace forever if their parent was deleted, and didnt Remove() themselves, causing harddels. * So anyways I repathed all organs * Fixes * really. * unit test... test * unit test-test but it passes linters this time because im a moh-ron * I've lost track of what im doing at this point * Hopefully fixes hard del? * meh * Update code/datums/dna.dm * things n stuff * repath from master pull
This commit is contained in:
@@ -234,34 +234,34 @@
|
||||
var/charge_modifier = 0.1
|
||||
|
||||
/obj/item/mod/core/ethereal/charge_source()
|
||||
var/obj/item/organ/stomach/ethereal/ethereal_stomach = mod.wearer.getorganslot(ORGAN_SLOT_STOMACH)
|
||||
var/obj/item/organ/internal/stomach/ethereal/ethereal_stomach = mod.wearer.getorganslot(ORGAN_SLOT_STOMACH)
|
||||
if(!istype(ethereal_stomach))
|
||||
return
|
||||
return ethereal_stomach
|
||||
|
||||
/obj/item/mod/core/ethereal/charge_amount()
|
||||
var/obj/item/organ/stomach/ethereal/charge_source = charge_source()
|
||||
var/obj/item/organ/internal/stomach/ethereal/charge_source = charge_source()
|
||||
return charge_source?.crystal_charge || ETHEREAL_CHARGE_NONE
|
||||
|
||||
/obj/item/mod/core/ethereal/max_charge_amount()
|
||||
return ETHEREAL_CHARGE_FULL
|
||||
|
||||
/obj/item/mod/core/ethereal/add_charge(amount)
|
||||
var/obj/item/organ/stomach/ethereal/charge_source = charge_source()
|
||||
var/obj/item/organ/internal/stomach/ethereal/charge_source = charge_source()
|
||||
if(!charge_source)
|
||||
return FALSE
|
||||
charge_source.adjust_charge(amount*charge_modifier)
|
||||
return TRUE
|
||||
|
||||
/obj/item/mod/core/ethereal/subtract_charge(amount)
|
||||
var/obj/item/organ/stomach/ethereal/charge_source = charge_source()
|
||||
var/obj/item/organ/internal/stomach/ethereal/charge_source = charge_source()
|
||||
if(!charge_source)
|
||||
return FALSE
|
||||
charge_source.adjust_charge(-amount*charge_modifier)
|
||||
return TRUE
|
||||
|
||||
/obj/item/mod/core/ethereal/update_charge_alert()
|
||||
var/obj/item/organ/stomach/ethereal/charge_source = charge_source()
|
||||
var/obj/item/organ/internal/stomach/ethereal/charge_source = charge_source()
|
||||
if(charge_source)
|
||||
mod.wearer.clear_alert(ALERT_MODSUIT_CHARGE)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user