Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into proc-define-shit

This commit is contained in:
SandPoot
2024-03-08 19:10:22 -03:00
810 changed files with 140372 additions and 5523 deletions
+3 -7
View File
@@ -1,17 +1,13 @@
/datum/component/personal_crafting/Initialize()
if(ismob(parent))
RegisterSignal(parent, COMSIG_MOB_CLIENT_LOGIN, PROC_REF(create_mob_button))
RegisterSignal(parent, COMSIG_MOB_HUD_CREATED, PROC_REF(create_mob_button))
/datum/component/personal_crafting/proc/create_mob_button(mob/user, client/CL)
/datum/component/personal_crafting/proc/create_mob_button(mob/user)
var/datum/hud/H = user.hud_used
for(var/huds in H.static_inventory)
if(istype(huds, /atom/movable/screen/craft))
return
//We don't want to be stacking multiple crafting huds on relogs
var/atom/movable/screen/craft/C = new()
C.icon = H.ui_style
H.static_inventory += C
CL.screen += C
user.client.screen += C
RegisterSignal(C, COMSIG_CLICK, PROC_REF(component_ui_interact))
/datum/component/personal_crafting
+1 -1
View File
@@ -117,7 +117,7 @@
return
if(LAZYACCESS(modifiers, ALT_CLICK))
return
if(source.mob.in_throw_mode)
if(source.mob.throw_mode)
return
if(!isturf(source.mob.loc)) //No firing inside lockers and stuff.
return
+2 -2
View File
@@ -328,9 +328,9 @@
/// For spawning mineral sheets at a specific location. Used by machines to output sheets.
/datum/component/material_container/proc/retrieve_sheets(sheet_amt, var/datum/material/M, target = null)
if(!M.sheet_type)
return 0 //Add greyscale sheet handling here later
return FALSE //Add greyscale sheet handling here later
if(sheet_amt <= 0)
return 0
return FALSE
if(!target)
target = get_turf(parent)
+2 -2
View File
@@ -268,7 +268,7 @@
else
if(the_event.timeout)
addtimer(CALLBACK(src, PROC_REF(clear_event), null, category), the_event.timeout, TIMER_UNIQUE|TIMER_OVERRIDE)
return 0 //Don't have to update the event.
return FALSE //Don't have to update the event.
the_event = new type(src, param)//This causes a runtime for some reason, was this me? No - there's an event floating around missing a definition.
mood_events[category] = the_event
@@ -280,7 +280,7 @@
/datum/component/mood/proc/clear_event(datum/source, category)
var/datum/mood_event/event = mood_events[category]
if(!event)
return 0
return FALSE
mood_events -= category
qdel(event)
+9
View File
@@ -392,3 +392,12 @@
if(rider in AM.buckled_mobs)
AM.unbuckle_mob(rider)
. = ..()
/obj/item/riding_offhand/on_thrown(mob/living/carbon/user, atom/target)
if(rider == user)
return //Piggyback user.
user.unbuckle_mob(rider)
if(HAS_TRAIT(user, TRAIT_PACIFISM))
to_chat(user, span_notice("You gently let go of [rider]."))
return
return rider
+2 -2
View File
@@ -43,9 +43,9 @@
/datum/component/spawner/proc/try_spawn_mob()
var/atom/P = parent
if(spawned_mobs.len >= max_mobs)
return 0
return FALSE
if(spawn_delay > world.time)
return 0
return FALSE
spawn_delay = world.time + spawn_time
var/chosen_mob_type = pick(mob_types)
var/mob/living/simple_animal/L = new chosen_mob_type(P.loc)
@@ -63,7 +63,7 @@
if(!istype(I) || QDELETED(I)) //We're specialized stack storage, just ignore non stacks.
continue
if(!.[I.merge_type])
.[I.merge_type] = new /datum/numbered_display(I, I.amount)
.[I.merge_type] = new /datum/numbered_display(I, I.amount, src)
else
var/datum/numbered_display/ND = .[I.merge_type]
ND.number += I.amount
+1 -1
View File
@@ -486,7 +486,7 @@
var/atom/A = parent
A.do_squish()
//This proc return 1 if the item can be picked up and 0 if it can't.
//This proc return TRUE if the item can be picked up and 0 if it can't.
//Set the stop_messages to stop it from printing messages
/datum/component/storage/proc/can_be_inserted(obj/item/I, stop_messages = FALSE, mob/M)
if(!istype(I) || (I.item_flags & ABSTRACT))
+1 -1
View File
@@ -48,7 +48,7 @@
var/datum/numbered_display/ND = numbered_contents[type]
ND.sample_object.mouse_opacity = MOUSE_OPACITY_OPAQUE
ND.sample_object.screen_loc = "[cx]:[screen_pixel_x],[cy]:[screen_pixel_y]"
ND.sample_object.maptext = "<font color='white'>[(ND.number > 1)? "[ND.number]" : ""]</font>"
ND.sample_object.maptext = MAPTEXT("<font color='white'>[(ND.number > 1)? "[ND.number]" : ""]</font>")
ND.sample_object.layer = ABOVE_HUD_LAYER
ND.sample_object.plane = ABOVE_HUD_PLANE
. += ND.sample_object
+3 -3
View File
@@ -49,11 +49,11 @@
/datum/component/summoning/proc/do_spawn_mob(atom/spawn_location, summoner)
if(spawned_mobs.len >= max_mobs)
return 0
return FALSE
if(last_spawned_time > world.time)
return 0
return FALSE
if(!prob(spawn_chance))
return 0
return FALSE
last_spawned_time = world.time + spawn_delay
var/chosen_mob_type = pick(mob_types)
var/mob/living/simple_animal/L = new chosen_mob_type(spawn_location)
+1 -1
View File
@@ -66,7 +66,7 @@
///See if we can tackle or not. If we can, leap!
/datum/component/tackler/proc/checkTackle(mob/living/carbon/user, atom/A, params)
if(!user.in_throw_mode || user.get_active_held_item() || user.pulling || user.buckling)
if(!user.throw_mode || user.get_active_held_item() || user.pulling || user.buckling)
return
if(HAS_TRAIT(user, TRAIT_HULK))