mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
A bunch of little fixes and event features.
-Adds simplemob radio. A "headset" that can be used and listened on by simplemobs. Adminspawn the item, shove it into your mob's contents, and link a reference to the item into the mob's mob_radio var. Additional keys can be added same way as regular headsets before "implanting" into the mob. -Adds leap/pounce verb for simplemobs. Essentially a copy of how the dogborg pounce works. -Couple fixes to borg/animal pounces. (makes the pounce "animation" reset to default_y instead of hardcoded crap. Also disables spin on simplemobs when pouncing. Unfun maybe, but that var can always be toggled ingame to get the sick ninja moves) -Adds adminbus switch to enable abuse mode on trasheater. (only skips the whitelist, blacklist still applies) -Fixes a bunch of icon updates on the vorecode. Humanmobs no longer get forced canary runtiming mob icon updates, and the existing mob icon updates are no longer simplemob exclusive (and thus broken for pAIs and such) -Earlyports a fix for mobs wandering off when grabbed. -Earlyports a fix for adding verbs to mobs via varedit. (Was utterly broken for anything that wasn't STRICTLY a root type of human, robot, or AI. Also now works for simplemobs as well.)
This commit is contained in:
@@ -20,3 +20,12 @@
|
||||
/obj/item/device/radio/headset
|
||||
sprite_sheets = list(SPECIES_TESHARI = 'icons/mob/species/seromi/ears.dmi',
|
||||
SPECIES_WEREBEAST = 'icons/mob/species/werebeast/ears.dmi')
|
||||
|
||||
/obj/item/device/radio/headset/mob_headset //Adminbus headset for simplemob shenanigans.
|
||||
name = "nonhuman radio implant"
|
||||
desc = "An updated, modular intercom that requires no hands to operate. Takes encryption keys"
|
||||
|
||||
/obj/item/device/radio/headset/mob_headset/receive_range(freq, level)
|
||||
if(ismob(src.loc))
|
||||
return ..(freq, level)
|
||||
return -1
|
||||
@@ -359,13 +359,14 @@
|
||||
var/list/possibleverbs = list()
|
||||
possibleverbs += "Cancel" // One for the top...
|
||||
possibleverbs += typesof(/mob/proc,/mob/verb,/mob/living/proc,/mob/living/verb)
|
||||
switch(H.type)
|
||||
if(/mob/living/carbon/human)
|
||||
possibleverbs += typesof(/mob/living/carbon/proc,/mob/living/carbon/verb,/mob/living/carbon/human/verb,/mob/living/carbon/human/proc)
|
||||
if(/mob/living/silicon/robot)
|
||||
possibleverbs += typesof(/mob/living/silicon/proc,/mob/living/silicon/robot/proc,/mob/living/silicon/robot/verb)
|
||||
if(/mob/living/silicon/ai)
|
||||
possibleverbs += typesof(/mob/living/silicon/proc,/mob/living/silicon/ai/proc,/mob/living/silicon/ai/verb)
|
||||
if(istype(H,/mob/living/carbon/human))
|
||||
possibleverbs += typesof(/mob/living/carbon/proc,/mob/living/carbon/verb,/mob/living/carbon/human/verb,/mob/living/carbon/human/proc)
|
||||
if(istype(H,/mob/living/silicon/robot))
|
||||
possibleverbs += typesof(/mob/living/silicon/proc,/mob/living/silicon/robot/proc,/mob/living/silicon/robot/verb)
|
||||
if(istype(H,/mob/living/silicon/ai))
|
||||
possibleverbs += typesof(/mob/living/silicon/proc,/mob/living/silicon/ai/proc,/mob/living/silicon/ai/verb)
|
||||
if(istype(H,/mob/living/simple_mob))
|
||||
possibleverbs += typesof(/mob/living/simple_mob/proc,/mob/living/simple_mob/verb) //VOREStation edit, Apparently polaris simplemobs have no verbs at all.
|
||||
possibleverbs -= H.verbs
|
||||
possibleverbs += "Cancel" // ...And one for the bottom
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
if(isturf(holder.loc) && can_act())
|
||||
wander_delay--
|
||||
if(wander_delay <= 0)
|
||||
if(!wander_when_pulled && holder.pulledby)
|
||||
if(!wander_when_pulled && (holder.pulledby | holder.grabbed_by.len))
|
||||
ai_log("handle_wander_movement() : Being pulled and cannot wander. Exiting.", AI_LOG_DEBUG)
|
||||
return
|
||||
|
||||
|
||||
@@ -411,12 +411,12 @@
|
||||
|
||||
last_special = world.time + 10
|
||||
status_flags |= LEAPING
|
||||
pixel_y = 10
|
||||
pixel_y = pixel_y + 10
|
||||
|
||||
src.visible_message("<span class='danger'>\The [src] leaps at [T]!</span>")
|
||||
src.throw_at(get_step(get_turf(T),get_turf(src)), 4, 1, src)
|
||||
playsound(src.loc, 'sound/mecha/mechstep2.ogg', 50, 1)
|
||||
pixel_y = 0
|
||||
pixel_y = default_pixel_y
|
||||
cell.charge -= 750
|
||||
|
||||
sleep(5)
|
||||
|
||||
@@ -45,6 +45,9 @@
|
||||
var/mount_offset_x = 5 // Horizontal riding offset.
|
||||
var/mount_offset_y = 8 // Vertical riding offset
|
||||
|
||||
var/obj/item/device/radio/headset/mob_headset/mob_radio //Adminbus headset for simplemob shenanigans.
|
||||
does_spin = FALSE
|
||||
|
||||
// Release belly contents before being gc'd!
|
||||
/mob/living/simple_mob/Destroy()
|
||||
release_vore_contents()
|
||||
@@ -346,3 +349,81 @@
|
||||
return
|
||||
if(buckle_mob(M))
|
||||
visible_message("<span class='notice'>[M] starts riding [name]!</span>")
|
||||
|
||||
/mob/living/simple_mob/handle_message_mode(message_mode, message, verb, speaking, used_radios, alt_name)
|
||||
if(mob_radio)
|
||||
switch(message_mode)
|
||||
if("intercom")
|
||||
for(var/obj/item/device/radio/intercom/I in view(1, null))
|
||||
I.talk_into(src, message, verb, speaking)
|
||||
used_radios += I
|
||||
if("headset")
|
||||
if(mob_radio && istype(mob_radio,/obj/item/device/radio/headset/mob_headset))
|
||||
mob_radio.talk_into(src,message,null,verb,speaking)
|
||||
used_radios += mob_radio
|
||||
else
|
||||
if(message_mode)
|
||||
if(mob_radio && istype(mob_radio,/obj/item/device/radio/headset/mob_headset))
|
||||
mob_radio.talk_into(src,message, message_mode, verb, speaking)
|
||||
used_radios += mob_radio
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_mob/proc/leap()
|
||||
set name = "Pounce Target"
|
||||
set category = "Abilities"
|
||||
set desc = "Select a target to pounce at."
|
||||
|
||||
if(last_special > world.time)
|
||||
to_chat(src, "Your legs need some more rest.")
|
||||
return
|
||||
|
||||
if(incapacitated(INCAPACITATION_DISABLED))
|
||||
to_chat(src, "You cannot leap in your current state.")
|
||||
return
|
||||
|
||||
var/list/choices = list()
|
||||
for(var/mob/living/M in view(3,src))
|
||||
choices += M
|
||||
choices -= src
|
||||
|
||||
var/mob/living/T = input(src,"Who do you wish to leap at?") as null|anything in choices
|
||||
|
||||
if(!T || !src || src.stat) return
|
||||
|
||||
if(get_dist(get_turf(T), get_turf(src)) > 3) return
|
||||
|
||||
if(last_special > world.time)
|
||||
return
|
||||
|
||||
if(usr.incapacitated(INCAPACITATION_DISABLED))
|
||||
to_chat(src, "You cannot leap in your current state.")
|
||||
return
|
||||
|
||||
last_special = world.time + 10
|
||||
status_flags |= LEAPING
|
||||
pixel_y = pixel_y + 10
|
||||
|
||||
src.visible_message("<span class='danger'>\The [src] leaps at [T]!</span>")
|
||||
src.throw_at(get_step(get_turf(T),get_turf(src)), 4, 1, src)
|
||||
playsound(src.loc, 'sound/effects/bodyfall1.ogg', 50, 1)
|
||||
pixel_y = default_pixel_y
|
||||
|
||||
sleep(5)
|
||||
|
||||
if(status_flags & LEAPING) status_flags &= ~LEAPING
|
||||
|
||||
if(!src.Adjacent(T))
|
||||
to_chat(src, "<span class='warning'>You miss!</span>")
|
||||
return
|
||||
|
||||
if(ishuman(T))
|
||||
var/mob/living/carbon/human/H = T
|
||||
if(H.species.lightweight == 1)
|
||||
H.Weaken(3)
|
||||
return
|
||||
var/armor_block = run_armor_check(T, "melee")
|
||||
var/armor_soak = get_armor_soak(T, "melee")
|
||||
T.apply_damage(20, HALLOSS,, armor_block, armor_soak)
|
||||
if(prob(33))
|
||||
T.apply_effect(3, WEAKEN, armor_block)
|
||||
@@ -225,7 +225,7 @@
|
||||
|
||||
//Clean up our own business
|
||||
items_preserved.Cut()
|
||||
if(isanimal(owner))
|
||||
if(!ishuman(owner))
|
||||
owner.update_icons()
|
||||
|
||||
//Print notifications/sound if necessary
|
||||
@@ -273,7 +273,7 @@
|
||||
Pred.bloodstr.trans_to(Prey, Pred.reagents.total_volume / absorbed_count)
|
||||
|
||||
//Clean up our own business
|
||||
if(isanimal(owner))
|
||||
if(!ishuman(owner))
|
||||
owner.update_icons()
|
||||
|
||||
//Print notifications/sound if necessary
|
||||
|
||||
@@ -184,7 +184,8 @@
|
||||
if((mode_flags & DM_FLAG_LEAVEREMAINS) && M.digest_leave_remains)
|
||||
handle_remains_leaving(M)
|
||||
digestion_death(M)
|
||||
owner.update_icons()
|
||||
if(!ishuman(owner))
|
||||
owner.update_icons()
|
||||
if(compensation > 0)
|
||||
if(isrobot(owner))
|
||||
var/mob/living/silicon/robot/R = owner
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
var/can_be_drop_prey = FALSE
|
||||
var/can_be_drop_pred = TRUE // Mobs are pred by default.
|
||||
var/next_preyloop // For Fancy sound internal loop
|
||||
var/adminbus_trash = FALSE // For abusing trash eater for event shenanigans.
|
||||
|
||||
//
|
||||
// Hook for generic creation of stuff on new creatures
|
||||
@@ -366,9 +367,8 @@
|
||||
SA.prey_excludes[src] = world.time
|
||||
log_and_message_admins("[key_name(src)] used the OOC escape button to get out of [key_name(B.owner)] ([B.owner ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[B.owner.x];Y=[B.owner.y];Z=[B.owner.z]'>JMP</a>" : "null"])")
|
||||
|
||||
if(isanimal(B.owner))
|
||||
var/mob/living/simple_mob/SA = B.owner
|
||||
SA.update_icons()
|
||||
if(!ishuman(B.owner))
|
||||
B.owner.update_icons()
|
||||
|
||||
//You're in a dogborg!
|
||||
else if(istype(loc, /obj/item/device/dogborg/sleeper))
|
||||
@@ -589,7 +589,7 @@
|
||||
to_chat(src, "<span class='warning'>You are not allowed to eat this.</span>")
|
||||
return
|
||||
|
||||
if(is_type_in_list(I,edible_trash))
|
||||
if(is_type_in_list(I,edible_trash) | adminbus_trash)
|
||||
if(I.hidden_uplink)
|
||||
to_chat(src, "<span class='warning'>You really should not be eating this.</span>")
|
||||
message_admins("[key_name(src)] has attempted to ingest an uplink item. ([src ? "<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>" : "null"])")
|
||||
|
||||
Reference in New Issue
Block a user