More fixes etc

This commit is contained in:
BlackMajor
2022-04-25 23:27:24 +12:00
parent aeea4dfc9a
commit 6dc76ad03e
7 changed files with 145 additions and 32 deletions

View File

@@ -167,9 +167,7 @@
//Replace this with a VORE setting so all types of posibrains can/can't be digested on a whim //Replace this with a VORE setting so all types of posibrains can/can't be digested on a whim
return FALSE return FALSE
/obj/item/organ/internal/nano/digest_act(atom/movable/item_storage = null) //CHOMPEdit - moved prot organ digest to their appropriate file
//Make proteans recoverable too
return FALSE
// Gradual damage measurement // Gradual damage measurement
/obj/item /obj/item

View File

@@ -24,6 +24,7 @@
melee_damage_lower = 5 melee_damage_lower = 5
melee_damage_upper = 5 melee_damage_upper = 5
attacktext = list("slashed") attacktext = list("slashed")
see_in_dark = 10
min_oxy = 0 min_oxy = 0
max_oxy = 0 max_oxy = 0
@@ -47,6 +48,9 @@
player_msg = "In this form, your health will regenerate as long as you have metal in you." player_msg = "In this form, your health will regenerate as long as you have metal in you."
can_buckle = 1 can_buckle = 1
buckle_lying = 1
mount_offset_x = 0
mount_offset_y = 0
has_hands = 1 has_hands = 1
shock_resist = 1 shock_resist = 1
nameset = 1 nameset = 1
@@ -64,14 +68,73 @@
humanform = H humanform = H
updatehealth() updatehealth()
refactory = locate() in humanform.internal_organs refactory = locate() in humanform.internal_organs
verbs |= /mob/living/proc/hide
verbs |= /mob/living/proc/usehardsuit verbs |= /mob/living/proc/usehardsuit
verbs |= /mob/living/simple_mob/protean_blob/proc/nano_partswap
verbs |= /mob/living/simple_mob/protean_blob/proc/nano_regenerate
verbs |= /mob/living/simple_mob/protean_blob/proc/nano_blobform
verbs |= /mob/living/simple_mob/protean_blob/proc/nano_rig_transform
verbs |= /mob/living/simple_mob/protean_blob/proc/appearance_switch
verbs -= /mob/living/simple_mob/proc/nutrition_heal
else else
update_icon() update_icon()
verbs |= /mob/living/proc/hide
verbs |= /mob/living/simple_mob/proc/animal_mount
verbs |= /mob/living/proc/toggle_rider_reins
//Hidden verbs for macro hotkeying
/mob/living/simple_mob/protean_blob/proc/nano_partswap()
set name = "Ref - Single Limb"
set desc = "Allows you to replace and reshape your limbs as you see fit."
set category = "Abilities"
set hidden = 1
humanform.nano_partswap()
/mob/living/simple_mob/protean_blob/proc/nano_regenerate()
set name = "Total Reassembly (wip)"
set desc = "Completely reassemble yourself from whatever save slot you have loaded in preferences. Assuming you meet the requirements."
set category = "Abilities"
set hidden = 1
humanform.nano_regenerate()
/mob/living/simple_mob/protean_blob/proc/nano_blobform()
set name = "Toggle Blobform"
set desc = "Switch between amorphous and humanoid forms."
set category = "Abilities"
set hidden = 1
humanform.nano_blobform()
/mob/living/simple_mob/protean_blob/proc/nano_rig_transform()
set name = "Modify Form - Hardsuit"
set desc = "Allows a protean to retract its mass into its hardsuit module at will."
set category = "Abilities"
set hidden = 1
humanform.nano_rig_transform()
/mob/living/simple_mob/protean_blob/proc/appearance_switch()
set name = "Switch Blob Appearance"
set desc = "Allows a protean blob to switch its outwards appearance."
set category = "Abilities"
set hidden = 1
humanform.appearance_switch()
/mob/living/simple_mob/protean_blob/Login() /mob/living/simple_mob/protean_blob/Login()
..() ..()
plane_holder.set_vis(VIS_AUGMENTED, 1) plane_holder.set_vis(VIS_AUGMENTED, 1)
plane_holder.set_vis(VIS_CH_HEALTH_VR, 1)
plane_holder.set_vis(VIS_CH_ID, 1)
plane_holder.set_vis(VIS_CH_STATUS_R, 1)
plane_holder.set_vis(VIS_CH_BACKUP, 1) //Gonna need these so we can see the status of our host. Could probably write it so this only happens when worn, but eeehhh
if(!riding_datum)
riding_datum = new /datum/riding/simple_mob/protean_blob(src)
datum/riding/simple_mob/protean_blob/handle_vehicle_layer()
ridden.layer = OBJ_LAYER
/mob/living/simple_mob/protean_blob/MouseDrop_T()
return
/mob/living/simple_mob/protean_blob/runechat_y_offset(width, height)
return (..()) - (20*size_multiplier)
/mob/living/simple_mob/protean_blob/Destroy() /mob/living/simple_mob/protean_blob/Destroy()
humanform = null humanform = null
@@ -119,15 +182,12 @@
if((stat < DEAD) && (health <= 0)) if((stat < DEAD) && (health <= 0))
death() death()
nutrition = humanform.nutrition
//Overhealth //Overhealth
if(health > getMaxHealth()) if(health > getMaxHealth())
health = getMaxHealth() health = getMaxHealth()
//Grab any other interesting values
confused = humanform.confused
radiation = humanform.radiation
paralysis = humanform.paralysis
//Update our hud if we have one //Update our hud if we have one
if(healths) if(healths)
if(stat != DEAD) if(stat != DEAD)
@@ -239,13 +299,11 @@
/mob/living/simple_mob/protean_blob/lay_down() /mob/living/simple_mob/protean_blob/lay_down()
..() ..()
if(resting) if(resting)
animate(src,alpha = 40,time = 1 SECOND)
mouse_opacity = 0 mouse_opacity = 0
plane = ABOVE_OBJ_PLANE plane = ABOVE_OBJ_PLANE
else else
mouse_opacity = 1 mouse_opacity = 1
icon_state = "wake" icon_state = "wake"
animate(src,alpha = 255,time = 1 SECOND)
plane = MOB_PLANE plane = MOB_PLANE
sleep(7) sleep(7)
update_icon() update_icon()
@@ -347,6 +405,8 @@ var/global/list/disallowed_protean_accessories = list(
pulledby.stop_pulling() pulledby.stop_pulling()
stop_pulling() stop_pulling()
var/client/C = client
//Record where they should go //Record where they should go
var/atom/creation_spot = drop_location() var/atom/creation_spot = drop_location()
@@ -397,13 +457,14 @@ var/global/list/disallowed_protean_accessories = list(
//We can still speak our languages! //We can still speak our languages!
blob.languages = languages.Copy() blob.languages = languages.Copy()
blob.name = real_name blob.name = real_name
blob.voice_name = name
var/datum/species/protean/S = src.species var/datum/species/protean/S = src.species
blob.icon_living = S.blob_appearance blob.icon_living = S.blob_appearance
blob.item_state = S.blob_appearance blob.item_state = S.blob_appearance
blob.update_icon() blob.update_icon()
//Flip them to the protean panel //Flip them to the protean panel
client?.statpanel = "Protean" addtimer(CALLBACK(src, .proc/nano_set_panel, C), 4)
//Return our blob in case someone wants it //Return our blob in case someone wants it
return blob return blob
@@ -446,6 +507,8 @@ var/global/list/disallowed_protean_accessories = list(
pulledby.stop_pulling() pulledby.stop_pulling()
stop_pulling() stop_pulling()
var/client/C = blob.client
//Stop healing if we are //Stop healing if we are
if(blob.healing) if(blob.healing)
blob.healing.expire() blob.healing.expire()
@@ -497,7 +560,11 @@ var/global/list/disallowed_protean_accessories = list(
qdel(blob) qdel(blob)
//Flip them to the protean panel //Flip them to the protean panel
client?.statpanel = "Protean" addtimer(CALLBACK(src, .proc/nano_set_panel, C), 4)
//Return ourselves in case someone wants it //Return ourselves in case someone wants it
return src return src
/mob/living/carbon/human/proc/nano_set_panel(var/client/C)
if(C)
C.statpanel = "Protean"

View File

@@ -193,3 +193,6 @@
/obj/item/device/mmi/digital/posibrain/nano/transfer_identity() /obj/item/device/mmi/digital/posibrain/nano/transfer_identity()
. = ..() . = ..()
icon_state = "posi1" icon_state = "posi1"
/obj/item/organ/internal/nano/digest_act(atom/movable/item_storage = null)
return FALSE

View File

@@ -9,29 +9,32 @@
set category = "Abilities" set category = "Abilities"
set hidden = 1 set hidden = 1
var/mob/living/caller = src
if(temporary_form)
caller = temporary_form
if(stat) if(stat)
to_chat(src,"<span class='warning'>You must be awake and standing to perform this action!</span>") to_chat(caller,"<span class='warning'>You must be awake and standing to perform this action!</span>")
return return
if(!isturf(loc)) if(!isturf(caller.loc))
to_chat(src,"<span class='warning'>You need more space to perform this action!</span>") to_chat(caller,"<span class='warning'>You need more space to perform this action!</span>")
return return
var/obj/item/organ/internal/nano/refactory/refactory = nano_get_refactory() var/obj/item/organ/internal/nano/refactory/refactory = nano_get_refactory()
//Missing the organ that does this //Missing the organ that does this
if(!istype(refactory)) if(!istype(refactory))
to_chat(src,"<span class='warning'>You don't have a working refactory module!</span>") to_chat(caller,"<span class='warning'>You don't have a working refactory module!</span>")
return return
var/choice = tgui_input_list(src,"Pick the bodypart to change:", "Refactor - One Bodypart", species.has_limbs) var/choice = tgui_input_list(caller,"Pick the bodypart to change:", "Refactor - One Bodypart", species.has_limbs)
if(!choice) if(!choice)
return return
//Organ is missing, needs restoring //Organ is missing, needs restoring
if(!organs_by_name[choice] || istype(organs_by_name[choice], /obj/item/organ/external/stump)) //allows limb stumps to regenerate like removed limbs. if(!organs_by_name[choice] || istype(organs_by_name[choice], /obj/item/organ/external/stump)) //allows limb stumps to regenerate like removed limbs.
if(refactory.get_stored_material(MAT_STEEL) < PER_LIMB_STEEL_COST) if(refactory.get_stored_material(MAT_STEEL) < PER_LIMB_STEEL_COST)
to_chat(src,"<span class='warning'>You're missing that limb, and need to store at least [PER_LIMB_STEEL_COST] steel to regenerate it.</span>") to_chat(caller,"<span class='warning'>You're missing that limb, and need to store at least [PER_LIMB_STEEL_COST] steel to regenerate it.</span>")
return return
var/regen = tgui_alert(src,"That limb is missing, do you want to regenerate it in exchange for [PER_LIMB_STEEL_COST] steel?","Regenerate limb?",list("Yes","No")) var/regen = tgui_alert(caller,"That limb is missing, do you want to regenerate it in exchange for [PER_LIMB_STEEL_COST] steel?","Regenerate limb?",list("Yes","No"))
if(regen != "Yes") if(regen != "Yes")
return return
if(!refactory.use_stored_material(MAT_STEEL,PER_LIMB_STEEL_COST)) if(!refactory.use_stored_material(MAT_STEEL,PER_LIMB_STEEL_COST))
@@ -40,8 +43,11 @@
var/obj/item/organ/external/oldlimb = organs_by_name[choice] var/obj/item/organ/external/oldlimb = organs_by_name[choice]
oldlimb.removed() oldlimb.removed()
qdel(oldlimb) qdel(oldlimb)
var/mob/living/simple_mob/protean_blob/blob
var/mob/living/simple_mob/protean_blob/blob = nano_intoblob() if(!temporary_form)
blob = nano_intoblob()
else
blob = temporary_form
active_regen = 1 active_regen = 1
if(do_after(blob,5 SECONDS)) if(do_after(blob,5 SECONDS))
var/list/limblist = species.has_limbs[choice] var/list/limblist = species.has_limbs[choice]
@@ -52,7 +58,6 @@
new_eo.sync_colour_to_human(src) new_eo.sync_colour_to_human(src)
regenerate_icons() regenerate_icons()
active_regen = 0 active_regen = 0
nano_outofblob(blob)
return return
//Organ exists, let's reshape it //Organ exists, let's reshape it
@@ -68,7 +73,7 @@
usable_manufacturers[company] = M usable_manufacturers[company] = M
if(!usable_manufacturers.len) if(!usable_manufacturers.len)
return return
var/manu_choice = tgui_input_list(src, "Which manufacturer do you wish to mimic for this limb?", "Manufacturer for [choice]", usable_manufacturers) var/manu_choice = tgui_input_list(caller, "Which manufacturer do you wish to mimic for this limb?", "Manufacturer for [choice]", usable_manufacturers)
if(!manu_choice) if(!manu_choice)
return //Changed mind return //Changed mind
@@ -78,7 +83,6 @@
return //Lost it meanwhile return //Lost it meanwhile
eo.robotize(manu_choice) eo.robotize(manu_choice)
visible_message("<B>[src]</B>'s [choice] loses its shape, then reforms.")
update_icons_body() update_icons_body()
/mob/living/carbon/human/proc/nano_regenerate() /mob/living/carbon/human/proc/nano_regenerate()
@@ -86,8 +90,10 @@
set desc = "Completely reassemble yourself from whatever save slot you have loaded in preferences. Assuming you meet the requirements." set desc = "Completely reassemble yourself from whatever save slot you have loaded in preferences. Assuming you meet the requirements."
set category = "Abilities" set category = "Abilities"
set hidden = 1 set hidden = 1
var/mob/living/caller = src
if(temporary_form) if(temporary_form)
to_chat(temporary_form,"<span class ='warning'>This function isn't coded yet. Soon, my child.</span>") caller = temporary_form
to_chat(caller,"<span class ='warning'>This function isn't coded yet. Soon, my child.</span>")
else else
to_chat(src,"<span class ='warning'>This function isn't coded yet. Soon, my child.</span>") to_chat(src,"<span class ='warning'>This function isn't coded yet. Soon, my child.</span>")
@@ -316,9 +322,10 @@
if(P.stat) if(P.stat)
to_chat(P,"<span class='warning'>You can only do this while not stunned.</span>") to_chat(P,"<span class='warning'>You can only do this while not stunned.</span>")
else else
if(P.l_hand) drop_from_inventory(P.l_hand) if(P.l_hand)
if(P.r_hand) drop_from_inventory(P.r_hand) drop_from_inventory(P.l_hand)
P.has_hands = 0 if(P.r_hand)
drop_from_inventory(P.r_hand)
S.OurRig.myprotean = P S.OurRig.myprotean = P
src.drop_from_inventory(S.OurRig) src.drop_from_inventory(S.OurRig)
P.forceMove(S.OurRig) P.forceMove(S.OurRig)
@@ -396,7 +403,11 @@ CHOMP Removal end*/
if(temporary_form) if(temporary_form)
if(blobstyle) if(blobstyle)
temporary_form.icon_living = S.blob_appearance temporary_form.icon_living = S.blob_appearance
temporary_form.item_state = S.blob_appearance
temporary_form.update_icon() temporary_form.update_icon()
if(istype(temporary_form.loc, /obj/item/weapon/holder/protoblob))
var/obj/item/weapon/holder/protoblob/PB = temporary_form.loc
PB.item_state = S.blob_appearance
/// /// /// A helper to reuse /// /// /// A helper to reuse
/mob/living/proc/nano_get_refactory(obj/item/organ/internal/nano/refactory/R) /mob/living/proc/nano_get_refactory(obj/item/organ/internal/nano/refactory/R)

View File

@@ -23,6 +23,7 @@
protean = 1 protean = 1
offline_vision_restriction = 0 offline_vision_restriction = 0
open = 1 open = 1
cell_type = /obj/item/weapon/cell/protean
/obj/item/weapon/rig/protean/relaymove(mob/user, var/direction) /obj/item/weapon/rig/protean/relaymove(mob/user, var/direction)
if(user.stat || user.stunned) if(user.stat || user.stunned)
@@ -34,6 +35,9 @@
return TRUE return TRUE
return ..() return ..()
/obj/item/weapon/rig/protean/digest_act(atom/movable/item_storage = null)
return FALSE
/obj/item/weapon/rig/protean/New(var/newloc, var/mob/living/carbon/human/P) /obj/item/weapon/rig/protean/New(var/newloc, var/mob/living/carbon/human/P)
if(P) if(P)
var/datum/species/protean/S = P.species var/datum/species/protean/S = P.species
@@ -344,3 +348,32 @@
if(istype(W,/obj/item/weapon/storage/backpack)) if(istype(W,/obj/item/weapon/storage/backpack))
AssimilateBag(user,0,W) AssimilateBag(user,0,W)
..() ..()
/obj/item/weapon/cell/protean
name = "Protean power cell"
desc = "Something terrible must have happened if you're managing to see this."
maxcharge = 10000
charge_amount = 100
var/mob/living/carbon/human/charger
/obj/item/weapon/cell/protean/New()
charge = maxcharge
update_icon()
addtimer(CALLBACK(src, .proc/search_for_protean), 60)
/obj/item/weapon/cell/protean/proc/search_for_protean()
if(istype(src.loc, /obj/item/weapon/rig/protean))
var/obj/item/weapon/rig/protean/prig = src.loc
charger = prig.wearer
if(charger)
START_PROCESSING(SSobj, src)
/obj/item/weapon/cell/protean/process()
var/C = charge
if(charger)
if((world.time >= last_use + charge_delay) && charger.nutrition > 100)
give(charge_amount)
charger.nutrition -= ((1/200)*(charge - C)) //Take nutrition relative to charge. Change the 1/200 if you want to alter the nutrition to charge ratio
else
return PROCESS_KILL

View File

@@ -14,7 +14,7 @@
flesh_color = "#505050" flesh_color = "#505050"
base_color = "#FFFFFF" //Color mult, start out with this base_color = "#FFFFFF" //Color mult, start out with this
flags = NO_SCAN | NO_SLIP | NO_MINOR_CUT | NO_HALLUCINATION | NO_INFECT | NO_PAIN flags = NO_SCAN | NO_SLIP | NO_MINOR_CUT | NO_HALLUCINATION | NO_INFECT
appearance_flags = HAS_SKIN_COLOR | HAS_EYE_COLOR | HAS_HAIR_COLOR | HAS_UNDERWEAR | HAS_LIPS appearance_flags = HAS_SKIN_COLOR | HAS_EYE_COLOR | HAS_HAIR_COLOR | HAS_UNDERWEAR | HAS_LIPS
spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED | SPECIES_WHITELIST_SELECTABLE spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED | SPECIES_WHITELIST_SELECTABLE
health_hud_intensity = 2 health_hud_intensity = 2
@@ -35,6 +35,7 @@
max_age = 200 max_age = 200
oxy_mod = 0 oxy_mod = 0
radiation_mod = 0 //Can't be assed with fandangling rad protections while blob formed/suited radiation_mod = 0 //Can't be assed with fandangling rad protections while blob formed/suited
darksight = 10
hazard_low_pressure = -1 //Space doesn't bother them hazard_low_pressure = -1 //Space doesn't bother them
hazard_high_pressure = INFINITY //consistency hazard_high_pressure = INFINITY //consistency

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB