Merge branch 'evilew:master' into feature/bluespace_collar

This commit is contained in:
AlManiak
2025-02-01 00:46:12 +01:00
committed by GitHub
9 changed files with 207 additions and 3 deletions
@@ -16,3 +16,16 @@
tools = list(TOOL_WELDER, TOOL_WRENCH, TOOL_SCREWDRIVER)
subcategory = CAT_MISCELLANEOUS
category = CAT_MISCELLANEOUS
/datum/crafting_recipe/liberator // It's easy to craft, but it's not a good gun.
name = "Liberator Pistol"
reqs = list(
/obj/item/stack/sheet/metal = 3,
/obj/item/weaponcrafting/receiver = 1,
/obj/item/ammo_casing/c10mm = 1,
)
result = /obj/item/gun/ballistic/liberator
tools = list(TOOL_WELDER, TOOL_SCREWDRIVER)
category = CAT_WEAPONRY
subcategory = CAT_WEAPON
@@ -0,0 +1,113 @@
//Lists to keep track of:
// - Mobs with a sprite size over 100%
// - Mobs with the toggle activated
// Done to reduce the amount of mobs that need to be taken into account when the toggle is switched and for updating the seen sprite
GLOBAL_LIST_EMPTY(enabled_smallsprite)
GLOBAL_LIST_EMPTY(see_toggle_smallsprite)
/mob/
///var to know if one has the toggle activated or not
var/see_resized_others = FALSE
/datum/atom_hud/alternate_appearance/basic/showSmall
//Verb for the associated toggle.
//When switched on, add the current mob to the list of mobs that need to see smallsprites and apply the ones already present immediately to the mob's hud.
//When switched off, remove from the list and remove smallsprites for the user's hud.
/client/verb/toggle_others_giant()
set name = "Toggle Others' Giant Sprite"
set category = "Preferences.GS13"
set desc = "Change display settings to and from displaying others' giant sprites."
var/list/remove_from_list = new()
mob.see_resized_others = !mob.see_resized_others
if(mob.see_resized_others)
GLOB.see_toggle_smallsprite += mob
for(var/mob/living/resize_mob in GLOB.enabled_smallsprite)
if(QDELETED(resize_mob))
remove_from_list += resize_mob
continue
if(resize_mob && resize_mob != mob && resize_mob.alternate_appearances && resize_mob.alternate_appearances["gscode_smallsprite"])
var/datum/atom_hud/alternate_appearance/appearance = resize_mob.alternate_appearances["gscode_smallsprite"]
appearance.add_to_single_hud(mob, resize_mob)
GLOB.enabled_smallsprite -= remove_from_list
to_chat(src, "Resize others view toggled ON.")
return
GLOB.see_toggle_smallsprite -= mob
for(var/mob/living/resize_mob in GLOB.enabled_smallsprite)
if(QDELETED(resize_mob))
remove_from_list += resize_mob
continue
if(resize_mob && resize_mob.alternate_appearances && resize_mob.alternate_appearances["gscode_smallsprite"])
var/datum/atom_hud/alternate_appearance/appearance = resize_mob.alternate_appearances["gscode_smallsprite"]
appearance.remove_from_single_hud(mob, resize_mob)
GLOB.enabled_smallsprite -= remove_from_list
to_chat(src, "Resize others view toggled OFF.")
///Generate the image based on the mob's current icon and apply matrix transformations to adjust its position and angle
/mob/living/proc/create_smallsprite()
var/image/smallsprite = image(icon=icon, icon_state=icon_state, loc=src, layer=layer, pixel_x=pixel_x, pixel_y=pixel_y)
smallsprite.overlays += overlays
smallsprite.override = TRUE
var/matrix/ntransform = matrix(lying, MATRIX_ROTATE)
if(lying != 0)
ntransform.Translate(0, -get_standard_pixel_y_offset(lying))
smallsprite.transform = ntransform
return smallsprite
/**
* Call to regenerate the sprites and update huds.
* * If present, remove the old sprite from the huds and from the mob
* * If the size_multiplier is still higher than 1, check if the mob is in the list of smallsprite mobs and add it if not
* * add a new sprite by generating it, then go through the list of mobs with smallsprites toggled on and it to their hud
* * If the size_multiplier was not higher than one then remove the mob from the list of smallsprite mobs
*/
/mob/living/proc/regenerate_smallsprite()
var/list/remove_from_list = new()
if(length(alternate_appearances) && alternate_appearances["gscode_smallsprite"])
for(var/mob/viewer_mob in GLOB.see_toggle_smallsprite)
if(QDELETED(viewer_mob))
remove_from_list += viewer_mob
continue
var/datum/atom_hud/alternate_appearance/appearance = alternate_appearances["gscode_smallsprite"]
appearance.remove_from_single_hud(viewer_mob, src)
remove_alt_appearance("gscode_smallsprite")
if(size_multiplier > 1)
if(!GLOB.enabled_smallsprite[src])
GLOB.enabled_smallsprite += src
add_alt_appearance(/datum/atom_hud/alternate_appearance/basic/showSmall, "gscode_smallsprite", create_smallsprite(), FALSE)
for(var/mob/viewer_mob in GLOB.see_toggle_smallsprite)
if(QDELETED(viewer_mob))
remove_from_list += viewer_mob
continue
if(viewer_mob != src)
var/datum/atom_hud/alternate_appearance/appearance = alternate_appearances["gscode_smallsprite"]
appearance.add_to_single_hud(viewer_mob, src)
return TRUE
else
if(GLOB.enabled_smallsprite[src])
GLOB.enabled_smallsprite -= src
GLOB.see_toggle_smallsprite -= remove_from_list
return FALSE
//Called periodically to regenerate the mob's smallsprite
/mob/living/carbon/human/BiologicalLife(delta_time, times_fired)
. = ..()
regenerate_smallsprite()
@@ -5,8 +5,10 @@
desc = "This implant was meant to prevent people from going hungry, but due to a flaw in its designs, it permanently produces a small amount of nutriment overtime."
icon_state = "chest_implant"
implant_color = "#006607"
nutrition_amount = 20 //Dunno if this is still needed. Will test.
hunger_threshold = NUTRITION_LEVEL_FULL
poison_amount = 10
message = "" //Why wasn't this ported over? Spam is a pain in the butt. Just shaddup already!
/obj/item/organ/cyberimp/chest/mobility
name = "Mobility Nanite Core"
@@ -0,0 +1,63 @@
/obj/item/gun/ballistic/liberator
name = "liberator pistol"
desc = "Hey, it's better than no gun, right?"
icon = 'GainStation13/icons/obj/weapons/gun.dmi' // Sprites were made by Static and Lew
icon_state = "liberator"
w_class = WEIGHT_CLASS_SMALL // It's not really much of a gun...
mag_type = /obj/item/ammo_box/magazine/m10mm/ramrod
can_suppress = FALSE
/// How many bullets are currently stashed in the gun
var/list/stashed_bullets = list()
/// What is the max amount of bullets we can stash in this baby?
var/max_bullets = 5
/obj/item/gun/ballistic/liberator/examine(mob/user)
. = ..()
. += span_notice("Inside of the weapon there is a storage container, containing [length(stashed_bullets)] 10mm bullets.")
. += span_notice("Bullets can be removed from the internal storage using <b>Alt+Click</b>.")
/obj/item/gun/ballistic/liberator/attackby(obj/item/A, mob/user, params)
if(!istype(A, /obj/item/ammo_casing/c10mm))
return ..()
if(length(stashed_bullets) >= max_bullets)
to_chat(user, span_notice("The storage container in the gun is already full."))
return
if(!A.forceMove(src))
return
stashed_bullets += A
to_chat(user, span_notice("You slip the [A] inside of the storage chamber."))
return
/obj/item/gun/ballistic/liberator/AltClick(mob/user)
if(!length(stashed_bullets))
to_chat(user, span_notice("The storage container in the gun is already empty."))
return
var/obj/item/removed_bullet = stashed_bullets[1]
if(!user.put_in_hands(removed_bullet))
return
stashed_bullets.Remove(removed_bullet)
to_chat(user, span_notice("You remove the [removed_bullet] from [src]"))
/obj/item/gun/ballistic/liberator/can_shoot()
if(!chambered)
return FALSE
return TRUE
/obj/item/ammo_box/magazine/m10mm/ramrod // baaaaaaa
name = "ram rod"
desc = "Allows for bullets to be pushed into guns."
icon = 'GainStation13/icons/obj/weapons/gun.dmi'
icon_state = "ram_rod"
max_ammo = 1
multiple_sprites = 1
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

@@ -13,6 +13,8 @@
var/hunger_threshold = NUTRITION_LEVEL_STARVING
var/synthesizing = 0
var/poison_amount = 5
var/nutrition_amount = 50 // GS13
var/message = "<span class='notice'>You feel less hungry...</span>" // GS13
slot = ORGAN_SLOT_STOMACH_AID
/obj/item/organ/cyberimp/chest/nutriment/on_life()
@@ -26,9 +28,9 @@
if(owner.nutrition <= hunger_threshold)
synthesizing = TRUE
to_chat(owner, "<span class='notice'>You feel less hungry...</span>")
owner.adjust_nutrition(50)
addtimer(CALLBACK(src, PROC_REF(synth_cool)), 50)
to_chat(owner, message)
owner.nutrition += nutrition_amount
addtimer(CALLBACK(src,PROC_REF(synth_cool)), 50)
/obj/item/organ/cyberimp/chest/nutriment/proc/synth_cool()
synthesizing = FALSE
+3
View File
@@ -28,6 +28,9 @@
/obj/item/clothing/under/misc/poly_bottomless = 3,
/obj/item/clothing/under/misc/poly_tanktop = 3,
/obj/item/clothing/under/misc/poly_tanktop/female = 3,
/obj/item/clothing/under/latexfull = 10, //GS13 - ported over latex clothing options
/obj/item/clothing/under/latexhalf = 10, //GS13 - ported over latex clothing options
/obj/item/clothing/gloves/latexsleeves = 10, //GS13 - ported over latex clothing options
/obj/item/autosurgeon/penis = 3,
/obj/item/autosurgeon/testicles = 3,
/obj/item/storage/pill_bottle/penis_enlargement = 10,
@@ -77,6 +77,7 @@
dat += {"<HR>"}//Newline for the objects
//bottom options
dat += "<a href='byond://?src=[REF(src)];toggle_giant=1'>Toggle others' giant sprites</A>" //GS13 Edit
dat += "<a href='byond://?src=[REF(src)];refresh=1'>Refresh</A>"
dat += "<a href='byond://?src=[REF(src)];omenu=1'>Old Menu</A>"
dat += "<a href='byond://?src=[REF(src)];underwear=1'>Toggle Undergarments </A>"
@@ -281,6 +282,11 @@
H.underwear_toggle()
return
if(href_list["toggle_giant"])
if(H && H.client)
H.client.toggle_others_giant()
return
src.ui_interact(usr)
+2
View File
@@ -4076,6 +4076,7 @@
#include "GainStation13\code\modules\research\designs\nutri_designs.dm"
#include "GainStation13\code\modules\research\nanites\nanite_programs\fattening.dm"
#include "GainStation13\code\modules\research\techweb\nutritech_nodes.dm"
#include "GainStation13\code\modules\resize\height_limits.dm"
#include "GainStation13\code\modules\surgery\organs\augments.dm"
#include "GainStation13\code\modules\surgery\organs\tongue.dm"
#include "GainStation13\code\modules\vehicles\grocery_cart_scooter.dm"
@@ -4084,6 +4085,7 @@
#include "GainStation13\code\modules\vending\mealdor.dm"
#include "GainStation13\code\modules\vore\fatten_vore.dm"
#include "GainStation13\code\modules\weapons\grenades.dm"
#include "GainStation13\code\modules\weapons\pistols.dm"
#include "GainStation13\code\obj\items\bluespace_belt.dm"
#include "GainStation13\code\obj\items\circuits.dm"
#include "GainStation13\code\obj\items\floor_tiles.dm"